boltmem

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 NewAlerts

func NewAlerts(path string) (*Alerts, error)

NewAlerts returns a new alert provider.

func (*Alerts) Close

func (a *Alerts) Close() error

Close the alert provider.

func (*Alerts) Get

func (a *Alerts) Get(fp model.Fingerprint) (*types.Alert, error)

Get returns the alert for a given fingerprint.

func (*Alerts) GetPending

func (a *Alerts) GetPending() provider.AlertIterator

GetPending returns an iterator over all alerts that have pending notifications.

func (*Alerts) Put

func (a *Alerts) Put(alerts ...*types.Alert) error

Put adds the given alert to the set.

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

func NewSilences(path string, mk types.Marker) (*Silences, error)

NewSilences creates a new Silences provider.

func (*Silences) All

All returns all existing silences.

func (*Silences) Close

func (s *Silences) Close() error

Close the silences provider.

func (*Silences) Del

func (s *Silences) Del(uid uint64) error

Del removes a silence.

func (*Silences) Get

func (s *Silences) Get(uid uint64) (*types.Silence, error)

Get a silence associated with a fingerprint.

func (*Silences) Mutes

func (s *Silences) Mutes(lset model.LabelSet) bool

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(n, o int) (*types.SilencesQueryResponse, error)

Query returns n silences starting at page offset o.

func (*Silences) Set

func (s *Silences) Set(sil *types.Silence) (uint64, error)

Set a new silence.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL