(ctx context.Context)
| 51 | } |
| 52 | |
| 53 | func (s *serv) run(ctx context.Context) error { |
| 54 | select { |
| 55 | case <-time.After(s.conf.runSleep): |
| 56 | case <-ctx.Done(): |
| 57 | if s.conf.runReturnContextErr { |
| 58 | return ctx.Err() |
| 59 | } |
| 60 | } |
| 61 | return s.conf.runRetVal |
| 62 | } |
| 63 | |
| 64 | func (s *serv) shutDown(_ error) error { |
| 65 | return s.conf.stopRetVal |