mem

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2016 License: Apache-2.0 Imports: 5 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.

Jump to

Keyboard shortcuts

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