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

Method running

ring/basic_lifecycler.go:252–269  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

250}
251
252func (l *BasicLifecycler) running(ctx context.Context) error {
253 heartbeatTickerStop, heartbeatTickerChan := newDisableableTicker(l.cfg.HeartbeatPeriod)
254 defer heartbeatTickerStop()
255
256 for {
257 select {
258 case <-heartbeatTickerChan:
259 l.heartbeat(ctx)
260
261 case f := <-l.actorChan:
262 f()
263
264 case <-ctx.Done():
265 level.Info(l.logger).Log("msg", "ring lifecycler is shutting down", "ring", l.ringName)
266 return nil
267 }
268 }
269}
270
271func (l *BasicLifecycler) stopping(runningError error) error {
272 if runningError != nil {

Callers

nothing calls this directly

Calls 4

heartbeatMethod · 0.95
newDisableableTickerFunction · 0.85
DoneMethod · 0.65
LogMethod · 0.45

Tested by

no test coverage detected