alarm

package
v0.0.0-...-83d3498 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 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

type Alert struct {
	URL string `yaml:"url"`
}

func (*Alert) SentMessage

func (u *Alert) SentMessage(data *AlertMessage) (request string, err error)

type AlertMessage

type AlertMessage struct {
	Message    string `json:"message"`
	NoticeName string `json:"notice_name"`
	Serverity  string `json:"serverity"`
	Title      string `json:"summary"`
	DBName     string `json:"-"`
}
{
	"notice_name": "test2",
	"serverity": "P0",
	"summary": "test_summary",
	"message": "test_message"
}

type CallAlertmanagerError

type CallAlertmanagerError struct {
	Host    string
	Slience slience.Sliences
	Root    error
}

func (*CallAlertmanagerError) Error

func (e *CallAlertmanagerError) Error() string

type MatcherDefault

type MatcherDefault struct {
	chanhandle.Next
}

func (*MatcherDefault) Do

type WebhookLogic

type WebhookLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewWebhookLogic

func NewWebhookLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WebhookLogic

func (*WebhookLogic) Webhook

func (l *WebhookLogic) Webhook(req *types.AlarmRequest) error

Jump to

Keyboard shortcuts

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