Documentation
¶
Index ¶
- Constants
- func HasAlertWithId(id string, alerts []Alert) bool
- func NewAlertId() string
- func NewHttpMonitorId() string
- type Alert
- type App
- type DeadMansSwitch
- type HttpMonitor
- type Store
- func (s *Store) ActiveAlerts() []Alert
- func (s *Store) DeadMansSwitches() []DeadMansSwitch
- func (s *Store) GetEventTypes() ehevent.Allocators
- func (s *Store) HttpMonitors() []HttpMonitor
- func (s *Store) InstallSnapshot(snap *ehreader.Snapshot) error
- func (s *Store) LastUnnoticedAlertsNotified() time.Time
- func (s *Store) ProcessEvents(_ context.Context, processAndCommit ehreader.EventProcessorHandler) error
- func (s *Store) Snapshot() (*ehreader.Snapshot, error)
- func (s *Store) Version() ehclient.Cursor
Constants ¶
View Source
const (
Stream = "/alertmanager"
)
Variables ¶
This section is empty.
Functions ¶
func HasAlertWithId ¶
func NewAlertId ¶
func NewAlertId() string
func NewHttpMonitorId ¶
func NewHttpMonitorId() string
Types ¶
type Alert ¶
type Alert struct { Id string `json:"alert_key"` // name in JSON for backwards compat Subject string `json:"subject"` // same type of error should always have same subject Details string `json:"details"` Timestamp time.Time `json:"timestamp"` }
func FindAlertWithSubject ¶
type App ¶
func LoadUntilRealtime ¶
type DeadMansSwitch ¶
func FindDeadMansSwitchWithSubject ¶
func FindDeadMansSwitchWithSubject(subject string, dmss []DeadMansSwitch) *DeadMansSwitch
func GetExpiredDeadMansSwitches ¶
func GetExpiredDeadMansSwitches(switches []DeadMansSwitch, now time.Time) []DeadMansSwitch
type HttpMonitor ¶
type HttpMonitor struct { Id string `json:"id"` Created time.Time `json:"created"` Enabled bool `json:"enabled"` Url string `json:"url"` Find string `json:"find"` }
func EnabledHttpMonitors ¶ added in v1.0.1
func EnabledHttpMonitors(monitors []HttpMonitor) []HttpMonitor
func FindHttpMonitorWithId ¶
func FindHttpMonitorWithId(id string, monitors []HttpMonitor) *HttpMonitor
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ActiveAlerts ¶
func (*Store) DeadMansSwitches ¶
func (s *Store) DeadMansSwitches() []DeadMansSwitch
func (*Store) GetEventTypes ¶
func (s *Store) GetEventTypes() ehevent.Allocators
func (*Store) HttpMonitors ¶
func (s *Store) HttpMonitors() []HttpMonitor
func (*Store) LastUnnoticedAlertsNotified ¶
func (*Store) ProcessEvents ¶
Click to show internal directories.
Click to hide internal directories.