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:
co-authored by
Will Browne
parent
c7eb7fb58a
commit
4b95f611c2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user