notifications

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageType

type MessageType string
const (
	InfoNotification    MessageType = "INFO"
	WarningNotification MessageType = "WARNING"
	ErrorNotification   MessageType = "ERROR"
)

type Notification

type Notification struct {
	Type           MessageType
	Message        string
	CallingObjects []client.Object
}

func NewNotification

func NewNotification(mType MessageType, message string, callingObject ...client.Object) Notification

type NotificationAggregator

type NotificationAggregator struct {
	Notifications map[string][]Notification
	// contains filtered or unexported fields
}
var NotificationAggr NotificationAggregator

func (*NotificationAggregator) CreateNotificationTables

func (na *NotificationAggregator) CreateNotificationTables() map[string]string

CreateNotificationTables takes all generated notifications and returns a map[string]string that displays the notifications in a tabular format based on provider

func (*NotificationAggregator) DispatchNotification

func (na *NotificationAggregator) DispatchNotification(notification Notification, ProviderName string)

DispatchNotification is used to send a notification to the NotificationAggregator

Jump to

Keyboard shortcuts

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