v0

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationOperationCreated = "Created"
	NotificationOperationUpdated = "Updated"
	NotificationOperationDeleted = "Deleted"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	// The operation performed to trigger the notification.
	// One of:
	// * Created
	// * Updated
	// * Deleted
	Operation NotificationOperation

	// Tracks the backoff delay last used in a requeue so that it may
	// incremented or repeated (when at max delay) as appropriate.
	CreationTime *int64

	// The API object that has been changed.
	Object interface{}
}

Notification is the message that is sent to NATS to alert a controller that a change has been made to an object. A notification is sent by the API Server when a change is make by a client, or by a controller when reconciliation was not completed and it needs to be requeued.

func ConsumeMessage

func ConsumeMessage(msgData []byte) (*Notification, error)

ConsumeMessage generates a Notificatiion object from a json notification from NATS to a controller.

type NotificationOperation

type NotificationOperation string

NotificationOperation informs a reconciler what operation was performed in the API to trigger the notification.

Jump to

Keyboard shortcuts

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