MCPcopy
hub / github.com/grafana/dskit / newExampleServ

Function newExampleServ

services/example_test.go:15–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13}
14
15func 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.
24func (s *exampleService) collect(ctx context.Context) error {

Callers 1

ExampleServiceFunction · 0.85

Calls 1

NewBasicServiceFunction · 0.85

Tested by

no test coverage detected