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

Method Stop

pkg/alertmanager/alertmanager.go:454–473  ·  view source on GitHub ↗

Stop stops the Alertmanager.

()

Source from the content-addressed store, hash-verified

452
453// Stop stops the Alertmanager.
454func (am *Alertmanager) Stop() {
455 if am.inhibitor != nil {
456 am.inhibitor.Stop()
457 }
458
459 if am.dispatcher != nil {
460 am.dispatcher.Stop()
461 }
462
463 if am.persister != nil {
464 am.persister.StopAsync()
465 }
466
467 if service, ok := am.state.(services.Service); ok {
468 service.StopAsync()
469 }
470
471 am.alerts.Close()
472 close(am.stop)
473}
474
475func (am *Alertmanager) StopAndWait() {
476 am.Stop()

Callers 1

StopAndWaitMethod · 0.95

Calls 3

StopMethod · 0.65
StopAsyncMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected