()
| 13 | } |
| 14 | |
| 15 | func newExampleServ() *exampleService { |
| 16 | s := &exampleService{ |
| 17 | ch: make(chan string), |
| 18 | } |
| 19 | s.BasicService = NewBasicService(nil, s.collect, nil) // StartingFn, RunningFn, StoppingFn |
| 20 | return s |
| 21 | } |
| 22 | |
| 23 | // used as Running function. When service is stopped, context is canceled, so we react on it. |
| 24 | func (s *exampleService) collect(ctx context.Context) error { |
no test coverage detected