Documentation
¶
Overview ¶
Package notifier implements push notifications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composed ¶ added in v1.14.2
type Composed []Notifier
Composed represents the composite of multiple notifiers.
func NewComposed ¶ added in v1.14.2
NewComposed creates a new composed notifier.
type Message ¶ added in v1.14.1
type Message []string
Message holds the messages and success/failure status for notifiers.
func MergeMessages ¶ added in v1.14.1
MergeMessages keeps only the ones with highest severity.
func NewMessage ¶ added in v1.14.1
func NewMessage() Message
NewMessage creates a new empty Message.
func NewMessagef ¶ added in v1.14.1
NewMessagef creates a new Message containing one formatted string.
type Notifier ¶
type Notifier interface {
// Describe a notifier in a human-readable format by calling callback with service names and params.
Describe(yield func(name, params string) bool)
// Send out a message.
Send(ctx context.Context, ppfmt pp.PP, msg Message) bool
}
Notifier is an abstract service for push notifications.
type Shoutrrr ¶
type Shoutrrr struct {
// The router
Router *router.ServiceRouter
// The services
ServiceDescriptions []string
}
Shoutrrr wraps a handler of a shoutrrr router.
func NewShoutrrr ¶
NewShoutrrr creates a new shoutrrr notifier.
Click to show internal directories.
Click to hide internal directories.