Documentation ¶
Index ¶
- type Alerts
- type NotificationInfo
- type Silences
- func (s *Silences) Close() error
- func (s *Silences) Del(uid uint64) error
- func (s *Silences) Get(uid uint64) (*types.Silence, error)
- func (s *Silences) Mutes(lset model.LabelSet) bool
- func (s *Silences) Query(limit, offset uint, fn types.SilencesLessFunc) (*types.SilencesQueryResponse, error)
- func (s *Silences) Set(sil *types.Silence) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alerts ¶
type Alerts struct {
// contains filtered or unexported fields
}
Alerts gives access to a set of alerts. All methods are goroutine-safe.
func (*Alerts) GetPending ¶
func (a *Alerts) GetPending() provider.AlertIterator
GetPending returns an iterator over all alerts that have pending notifications.
func (*Alerts) Subscribe ¶
func (a *Alerts) Subscribe() provider.AlertIterator
Subscribe returns an iterator over active alerts that have not been resolved and successfully notified about. They are not guaranteed to be in chronological order.
type NotificationInfo ¶
type NotificationInfo struct {
// contains filtered or unexported fields
}
NotificationInfo provides information about pending and successful notifications. All methods are goroutine-safe.
func NewNotificationInfo ¶
func NewNotificationInfo(path string) (*NotificationInfo, error)
NewNotification creates a new notification info provider.
func (*NotificationInfo) Close ¶
func (n *NotificationInfo) Close() error
Close the notification information provider.
func (*NotificationInfo) Get ¶
func (n *NotificationInfo) Get(recv string, fps ...model.Fingerprint) ([]*types.NotifyInfo, error)
Get notification information for alerts and the given receiver.
func (*NotificationInfo) Set ¶
func (n *NotificationInfo) Set(ns ...*types.NotifyInfo) error
Set several notifies at once. All or none must succeed.
type Silences ¶
type Silences struct {
// contains filtered or unexported fields
}
Silences gives access to silences. All methods are goroutine-safe.
func NewSilences ¶
NewSilences creates a new Silences provider.
func (*Silences) Mutes ¶
The Silences provider must implement the Muter interface for all its silences. The data provider may have access to an optimized view of the data to perform this evaluation.
func (*Silences) Query ¶ added in v0.4.0
func (s *Silences) Query(limit, offset uint, fn types.SilencesLessFunc) (*types.SilencesQueryResponse, error)
Query returns at most limit silences starting at offset.