alert

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

Repository is an interface for alert repository

func NewAlertRepository

func NewAlertRepository(c configs.Config, pool *ants.Pool, version string, monitoring monitoring.Monitor) *Repository

NewAlertRepository creates a new alert repository

func (*Repository) CallCustom added in v1.0.0

func (r *Repository) CallCustom(url string, body []byte) error

CallCustom will send a Custom http request

func (*Repository) CallSlack added in v0.11.0

func (r *Repository) CallSlack(url string, body []byte) error

CallSlack will send a Slack http request

func (*Repository) CallSquadcast added in v0.8.0

func (r *Repository) CallSquadcast(url string, body []byte) error

CallSquadcast will send a Squadcast http request

func (*Repository) CallTelegram added in v0.8.0

func (r *Repository) CallTelegram(url string, body []byte) error

CallTelegram will send a Telegram bot http request

func (*Repository) CreateAlert

func (r *Repository) CreateAlert(ctx context.Context, alert models.Alert) error

CreateAlert creates an alert

func (*Repository) CreateCustomMessage added in v1.0.0

func (r *Repository) CreateCustomMessage(alert models.Alert) error

CreateCustomMessage creates an event in Custom

func (*Repository) CreateSlackMessage added in v0.11.0

func (r *Repository) CreateSlackMessage(alert models.Alert) error

CreateSlackMessage creates an event in Slack

func (*Repository) CreateSquadcastIncident

func (r *Repository) CreateSquadcastIncident(alert models.Alert) error

CreateSquadcastIncident creates an incident in squadcast

func (*Repository) CreateTelegramMessage

func (r *Repository) CreateTelegramMessage(alert models.Alert) error

CreateTelegramMessage sends a telegram message

Jump to

Keyboard shortcuts

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