alertmanager

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 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 Api

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

func NewAPI

func NewAPI(httpClient http.Client, host string, token string) *Api

func (*Api) CreateSilence

func (api *Api) CreateSilence(s Silence) error

func (*Api) DeleteSilence

func (api *Api) DeleteSilence(id string) error

func (*Api) ListSilences

func (api *Api) ListSilences() ([]Silence, error)

type Matcher

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

type Silence

type Silence struct {
	ID        string    `json:"id"`
	Comment   string    `json:"comment"`
	CreatedBy string    `json:"createdBy"`
	EndsAt    string    `json:"endsAt"`
	Matchers  []Matcher `json:"matchers"`
	StartsAt  string    `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