(ctx context.Context)
| 40 | } |
| 41 | |
| 42 | func (s *serv) startUp(ctx context.Context) error { |
| 43 | select { |
| 44 | case <-time.After(s.conf.startSleep): |
| 45 | case <-ctx.Done(): |
| 46 | if s.conf.startReturnContextErr { |
| 47 | return ctx.Err() |
| 48 | } |
| 49 | } |
| 50 | return s.conf.startRetVal |
| 51 | } |
| 52 | |
| 53 | func (s *serv) run(ctx context.Context) error { |
| 54 | select { |