alert

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alerter

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

func New

func New(cfg *config.Config) *Alerter

func (*Alerter) Send

func (a *Alerter) Send(event Event)

type Event

type Event struct {
	Type      EventType `json:"type"`
	Command   []string  `json:"command"`
	ExitCode  int       `json:"exit_code,omitempty"`
	Message   string    `json:"message,omitempty"`
	Timestamp time.Time `json:"timestamp"`
	Hostname  string    `json:"hostname"`
}

type EventType

type EventType string
const (
	EventStarted    EventType = "started"
	EventExited     EventType = "exited"
	EventTimeout    EventType = "timeout"
	EventRestart    EventType = "restart"
	EventHealthFail EventType = "health_failed"
	EventKilled     EventType = "killed"
)

Jump to

Keyboard shortcuts

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