alerting

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert added in v0.2.8

type Alert struct {
	State     AlertState
	CreatedAt time.Time
	UpdatedAt time.Time

	Labels      map[string]string
	Annotations map[string]string
}

type AlertState added in v0.2.8

type AlertState int
const (
	StateInactive AlertState = iota
	StatePending
	StateFiring
)

func (AlertState) String added in v0.2.9

func (s AlertState) String() string

type AlertingRule added in v0.2.8

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

type AlertingService

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

func New

func New(cfg *model.Config, alertRuleFiles []model.RuleFile, datasourceService datasourceservice.IDatasourceService, remoteService *remote.RemoteService) *AlertingService

func (*AlertingService) DoAlert added in v0.2.8

func (s *AlertingService) DoAlert() error

func (*AlertingService) SendTestAlert added in v0.2.4

func (s *AlertingService) SendTestAlert() error

type Fire added in v0.2.8

type Fire struct {
	Labels      map[string]string `json:"labels"`
	Annotations map[string]string `json:"annotations"`
}

type IAlertingService added in v0.2.8

type IAlertingService interface {
	DoAlert() error
}

Jump to

Keyboard shortcuts

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