handler

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVEventHandler

type CSVEventHandler struct {
	// contains filtered or unexported fields
}

CSV event handler mapping CSV events to registered watching Addons.

func NewCSVEventHandler

func NewCSVEventHandler() *CSVEventHandler

func (*CSVEventHandler) Create

Create is called in response to an create event.

func (*CSVEventHandler) Delete

Delete is called in response to a delete event.

func (*CSVEventHandler) Free

func (h *CSVEventHandler) Free(addon *addonsv1alpha1.Addon)

Free removes all event mappings associated with the given Addon.

func (*CSVEventHandler) Generic

Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or external trigger request - e.g. reconcile Autoscaling, or a Webhook.

func (*CSVEventHandler) ReplaceMap

func (h *CSVEventHandler) ReplaceMap(
	addon *addonsv1alpha1.Addon, csvKeys ...client.ObjectKey,
) (changed bool)

ReplaceMap tells the event handler about a Addon > CSV relation and setup mapping of future events. It returns true when the existing mapping had to be changed. WARNING: This method is potentially racy when the Addon object is not reenqueued by the calling reconcile loop when the mapping changes, as incomming events might be dropped before this method completes and the event mapping is updated. Calling code needs to make sure to reenqueue the Addon object for _every_ mapping change or CSV events might not be processed.

func (*CSVEventHandler) Update

Update is called in response to an update event.

Jump to

Keyboard shortcuts

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