client

package
v0.0.0-...-da5fcd2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configuration

func Configuration(am string) (string, error)

Configuration returns the configuration of the AlertManager instance.

func Version

func Version(am string) (string, error)

Version returns the version of the AlertManager instance.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder generates full-fledged alerts.

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns a Builder instance.

func (*Builder) CreateAlert

func (b *Builder) CreateAlert(lbls, anns map[string]string, start, end time.Time) *models.PostableAlert

CreateAlert returns a single alert.

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender is used to send alerts on a regular basis.

func NewSender

func NewSender(runs, batch int, interval time.Duration, l *log.Logger) *Sender

NewSender returns a Sender instance.

func (*Sender) Send

func (a *Sender) Send(ams []string, alerts models.PostableAlerts) error

Send sends alerts to the AlertManager instances.

Jump to

Keyboard shortcuts

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