fedinformer

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFilteringHandlerOnAllEvents

func NewFilteringHandlerOnAllEvents(filterFunc func(obj interface{}) bool, addFunc func(obj interface{}),
	updateFunc func(oldObj, newObj interface{}), deleteFunc func(obj interface{})) cache.ResourceEventHandler

NewFilteringHandlerOnAllEvents builds a FilteringResourceEventHandler applies the provided filter to all events coming in, ensuring the appropriate nested handler method is invoked.

Note: An object that starts passing the filter after an update is considered an add, and an object that stops passing the filter after an update is considered a delete. Like the handlers, the filter MUST NOT modify the objects it is given.

func NewHandlerOnAllEvents

func NewHandlerOnAllEvents(fn func(interface{})) cache.ResourceEventHandler

NewHandlerOnAllEvents builds a ResourceEventHandler that the function 'fn' will be called on all events(add/update/delete).

func NewHandlerOnEvents

func NewHandlerOnEvents(addFunc func(obj interface{}), updateFunc func(oldObj, newObj interface{}), deleteFunc func(obj interface{})) cache.ResourceEventHandler

NewHandlerOnEvents builds a ResourceEventHandler.

func NodeTransformFunc

func NodeTransformFunc(obj interface{}) (interface{}, error)

NodeTransformFunc is the dedicated transform function for Node objects. It cleans up some parts of the object before it will be put into the controller cache to reduce memory usage.

Note: this function removes most of the fields, please make sure your controller doesn't care for the removed fields, especially when use in shared informers.

func PodTransformFunc

func PodTransformFunc(obj interface{}) (interface{}, error)

PodTransformFunc is the dedicated transform function for Pod objects. It cleans up some parts of the object before it will be put into the controller cache to reduce memory usage.

Note: this function removes most of the fields, please make sure your controller doesn't care for the removed fields, especially when use in shared informers.

func StripUnusedFields

func StripUnusedFields(obj interface{}) (interface{}, error)

StripUnusedFields is the transform function for shared informers, it removes unused fields from objects before they are stored in the cache to save memory.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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