Chore: Add AwaitHealthy to ModuleEngine and Server (#72215)

* Chore: Add AwaitHealthy to ModuleEngine and Server

* switch from fmt.Errorf to errors.New

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>

---------

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
Todd Treece
2023-07-24 14:01:07 -04:00
committed by GitHub
co-authored by Will Browne
parent c7eb7fb58a
commit 4b95f611c2
4 changed files with 27 additions and 3 deletions
+5
View File
@@ -112,6 +112,11 @@ func (s *Server) init(ctx context.Context) error {
return s.roleRegistry.RegisterFixedRoles(ctx)
}
// AwaitHealthy waits for the server to become healthy.
func (s *Server) AwaitHealthy(ctx context.Context) error {
return s.moduleService.AwaitHealthy(ctx)
}
// Run initializes and starts services. This will block until all services have
// exited. To initiate shutdown, call the Shutdown method in another goroutine.
func (s *Server) Run(ctx context.Context) error {