alert

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 14 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) 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) 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