MCPcopy Create free account
hub / github.com/cortexproject/cortex / StopAndWait

Method StopAndWait

pkg/alertmanager/alertmanager.go:475–491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

473}
474
475func (am *Alertmanager) StopAndWait() {
476 am.Stop()
477
478 if am.persister != nil {
479 if err := am.persister.AwaitTerminated(context.Background()); err != nil {
480 level.Warn(am.logger).Log("msg", "error while stopping state persister service", "err", err)
481 }
482 }
483
484 if service, ok := am.state.(services.Service); ok {
485 if err := service.AwaitTerminated(context.Background()); err != nil {
486 level.Warn(am.logger).Log("msg", "error while stopping ring-based replication service", "err", err)
487 }
488 }
489
490 am.wg.Wait()
491}
492
493func (am *Alertmanager) mergePartialExternalState(part *clusterpb.Part) error {
494 if state, ok := am.state.(*state); ok {

Callers 4

stoppingMethod · 0.80
syncConfigsMethod · 0.80
TestSilencesLimitsFunction · 0.80

Calls 4

StopMethod · 0.95
AwaitTerminatedMethod · 0.65
LogMethod · 0.45
WaitMethod · 0.45

Tested by 2

TestSilencesLimitsFunction · 0.64