notify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NilNotifier

type NilNotifier struct{}

func NewNilNotifier

func NewNilNotifier() *NilNotifier

func (*NilNotifier) Send

func (nn *NilNotifier) Send(ctx context.Context, n Notification) error

type Notification

type Notification struct {
	Timestamp time.Time
	Type      Type
	Source    string
	Message   string
	Fields    map[string]interface{}
}

type Notifier

type Notifier interface {
	Send(ctx context.Context, n Notification) error
}

Notifier defines the contract for sending alarms and metrics. Implementations of this interface are responsible for formatting and dispatching notifications to their respective backends. Implementations MUST be safe for concurrent use by multiple goroutines.

type Type

type Type int
const (
	Alarm Type = iota
	Metric
)

func (Type) String

func (nt Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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