Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiNotifier ¶ added in v0.4.0
type MultiNotifier struct {
// contains filtered or unexported fields
}
MultiNotifier sends notifications to multiple notifiers.
func NewMultiNotifier ¶ added in v0.4.0
func NewMultiNotifier(notifiers ...Notifier) *MultiNotifier
NewMultiNotifier creates a new MultiNotifier.
func (*MultiNotifier) Send ¶ added in v0.4.0
func (mn *MultiNotifier) Send(ctx context.Context, n Notification) error
Send sends the notification to all notifiers. It stops and returns the error if any of the notifiers fail.
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 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.
Click to show internal directories.
Click to hide internal directories.