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

Method AwaitRunning

services/service.go:64–64  ·  view source on GitHub ↗

AwaitRunning waits until service gets into Running state. If service is in New or Starting state, this method is blocking. If service is already in Running state, returns immediately with no error. If service is in a state, from which it cannot get into Running state, error is returned immediately.

(ctx context.Context)

Source from the content-addressed store, hash-verified

62 // If service is already in Running state, returns immediately with no error.
63 // If service is in a state, from which it cannot get into Running state, error is returned immediately.
64 AwaitRunning(ctx context.Context) error
65
66 // StopAsync tell the service to stop. This method doesn't block and can be called multiple times.
67 // If Service is New, it is Terminated without having been started nor stopped.

Callers 10

startMethod · 0.65
TestStopInNewFunction · 0.65
runTestCaseFunction · 0.65
ExampleServiceFunction · 0.65
TestIdleServiceFunction · 0.65
TestTimerServiceFunction · 0.65
StartAndAwaitRunningFunction · 0.65

Implementers 2

BasicServiceservices/basic_service.go
mockServicegrpcutil/health_check_test.go

Calls

no outgoing calls

Tested by 7

TestStopInNewFunction · 0.52
runTestCaseFunction · 0.52
ExampleServiceFunction · 0.52
TestIdleServiceFunction · 0.52
TestTimerServiceFunction · 0.52