{"modulePath":"github.com/openshift/addon-operator","version":"v0.4.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package handler\n\n## Types\n\n```go\ntype CSVEventHandler struct {\n\t// contains filtered or unexported fields\n}\n```\nCSV event handler mapping CSV events to registered watching Addons.\n\n```go\nfunc NewCSVEventHandler() *CSVEventHandler\n```\n\n```go\nfunc (h *CSVEventHandler) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)\n```\nCreate is called in response to an create event.\n\n```go\nfunc (h *CSVEventHandler) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)\n```\nDelete is called in response to a delete event.\n\n```go\nfunc (h *CSVEventHandler) Free(addon *addonsv1alpha1.Addon)\n```\nFree removes all event mappings associated with the given Addon.\n\n```go\nfunc (h *CSVEventHandler) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)\n```\nGeneric 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.\n\n```go\nfunc (h *CSVEventHandler) ReplaceMap(\n\taddon *addonsv1alpha1.Addon, csvKeys ...client.ObjectKey,\n) (changed bool)\n```\nReplaceMap tells the event handler about a Addon \u003e 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.\n\n```go\nfunc (h *CSVEventHandler) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)\n```\nUpdate is called in response to an update event.\n\n","path":"github.com/openshift/addon-operator/internal/handler","name":"handler","synopsis":"","isRedistributable":true}
