(ctx context.Context)
| 250 | } |
| 251 | |
| 252 | func (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 | |
| 271 | func (l *BasicLifecycler) stopping(runningError error) error { |
| 272 | if runningError != nil { |
nothing calls this directly
no test coverage detected