StartAsync initiates service startup on all the services being managed. It is only valid to call this method if all of the services are New.
(ctx context.Context)
| 75 | // StartAsync initiates service startup on all the services being managed. |
| 76 | // It is only valid to call this method if all of the services are New. |
| 77 | func (m *Manager) StartAsync(ctx context.Context) error { |
| 78 | for _, s := range m.services { |
| 79 | err := s.StartAsync(ctx) |
| 80 | if err != nil { |
| 81 | return err |
| 82 | } |
| 83 | } |
| 84 | return nil |
| 85 | } |
| 86 | |
| 87 | // StopAsync initiates service shutdown if necessary on all the services being managed. |
| 88 | func (m *Manager) StopAsync() { |
no outgoing calls