alertmanager

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type AlertManager

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

func New

func New(config Config) (*AlertManager, error)

func (*AlertManager) CreateSilence

func (am *AlertManager) CreateSilence(s *Silence) error

func (*AlertManager) DeleteSilenceByComment

func (am *AlertManager) DeleteSilenceByComment(comment string) error

func (*AlertManager) DeleteSilenceByID added in v0.9.0

func (am *AlertManager) DeleteSilenceByID(id string) error

func (*AlertManager) GetSilenceByComment

func (am *AlertManager) GetSilenceByComment(comment string) (*Silence, error)

func (*AlertManager) ListSilences

func (am *AlertManager) ListSilences() ([]Silence, error)

func (*AlertManager) UpdateSilence added in v0.8.0

func (am *AlertManager) UpdateSilence(s *Silence) error

type Config

type Config struct {
	Address  string
	TenantId string
}

type Matcher

type Matcher struct {
	IsRegex bool   `json:"isRegex"`
	IsEqual bool   `json:"isEqual"`
	Name    string `json:"name"`
	Value   string `json:"value"`
}

type Silence

type Silence struct {
	Comment   string    `json:"comment"`
	CreatedBy string    `json:"createdBy"`
	EndsAt    time.Time `json:"endsAt"`
	ID        string    `json:"id"`
	Matchers  []Matcher `json:"matchers"`
	StartsAt  time.Time `json:"startsAt"`
	Status    *Status   `json:"status"`
}

type Status

type Status struct {
	State string `json:"state"`
}

Jump to

Keyboard shortcuts

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