Stop stops the Alertmanager.
()
| 452 | |
| 453 | // Stop stops the Alertmanager. |
| 454 | func (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 | |
| 475 | func (am *Alertmanager) StopAndWait() { |
| 476 | am.Stop() |
no test coverage detected