MCPcopy Index your code
hub / github.com/riverqueue/river / Start

Method Start

rivershared/startstop/start_stop_test.go:297–311  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

295}
296
297func (s *sampleServiceWithStopInit) Start(ctx context.Context) error {
298 ctx, shouldStart, started, stopped := s.StartInit(ctx)
299 if !shouldStart {
300 return nil
301 }
302
303 go func() {
304 started()
305 defer stopped()
306 s.state = true
307 <-ctx.Done()
308 }()
309
310 return nil
311}
312
313func (s *sampleServiceWithStopInit) Stop() {
314 shouldStop, stopped, finalizeStop := s.StopInit()

Callers

nothing calls this directly

Calls 2

StartInitMethod · 0.80
DoneMethod · 0.80

Tested by

no test coverage detected