(ctx context.Context)
| 38 | } |
| 39 | |
| 40 | func (s *testService) Start(ctx context.Context) error { |
| 41 | ctx, shouldStart, started, stopped := s.StartInit(ctx) |
| 42 | if !shouldStart { |
| 43 | return nil |
| 44 | } |
| 45 | |
| 46 | go func() { |
| 47 | started() |
| 48 | defer stopped() |
| 49 | |
| 50 | s.testSignals.started.Signal(struct{}{}) |
| 51 | <-ctx.Done() |
| 52 | s.testSignals.returning.Signal(struct{}{}) |
| 53 | }() |
| 54 | |
| 55 | return nil |
| 56 | } |
| 57 | |
| 58 | type testServiceTestSignals struct { |
| 59 | returning testsignal.TestSignal[struct{}] |