alerts

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const HeartbeatEvent = "heartbeat event"

Variables

This section is empty.

Functions

func Heartbeat added in v0.1.1

func Heartbeat(ctx context.Context, logger *logrus.Logger, alert Alert)

func Register

func Register(s Sender)

func Send

func Send(alert Alert) error

Types

type Alert

type Alert struct {
	Time        time.Time
	Message     string
	Reason      string
	Path        string
	ProcessName string
}

func New

func New(msg, reason, path, procName string) Alert

type Errors

type Errors []error

func (Errors) Error

func (es Errors) Error() (err string)

type Sender

type Sender interface {
	Send(alert Alert) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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