package
0.0.3
Repository: https://github.com/bhojpur/knative-pkg.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

EnsureTypeMeta augments the passed-in callback, ensuring that all objects that pass through this callback have their TypeMeta set according to the provided GVK.
Filter makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on the schema.GroupVersionKind of the controlling resources.
FilterController makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on the controlling resource.
FilterControllerGK makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on the schema.GroupKind of the controlling resources.
FilterControllerGVK makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on the schema.GroupVersionKind of the controlling resources.
FilterGroupKind makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on the schema.GroupKind of the controlling resources.
FilterGroupVersionKind makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on the schema.GroupVersionKind of the controlling resources.
FilterWithName makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on a name.
FilterWithNameAndNamespace makes it simple to create FilterFunc's for use with cache.FilteringResourceEventHandler that filter based on a namespace and a name.
GetEventRecorder attempts to look up the record.EventRecorder on a given context.
GetResyncPeriod returns the resync period associated with the given context.
GetTracker attempts to look up the tracker.Interface on a given context.
GetTrackerLease fetches the tracker lease from the controller context.
HandleAll wraps the provided handler function into a cache.ResourceEventHandler that sends all events to the given handler.
IsPermanentError returns true if the given error is a permanentError or wraps a permanentError.
IsRequeueKey returns true if the given error is a requeueKeyError.
IsSkipKey returns true if the given error is a skipKeyError.
MustNewStatsReporter creates a new instance of StatsReporter.
NewContext instantiates an instance of our controller that will feed work to the provided Reconciler as it is enqueued.
NewPermanentError returns a new instance of permanentError.
NewRequeueAfter returns a new instance of requeueKeyError.
NewRequeueImmediately returns a new instance of requeueKeyError.
NewSkipKey returns a new instance of skipKeyError.
NewStatsReporter creates a reporter that collects and reports metrics.
PassNew makes it simple to create an UpdateFunc for use with cache.ResourceEventHandlerFuncs that can delegate the same methods as AddFunc/DeleteFunc but passing through only the second argument (which is the "new" object).
RunInformers kicks off all of the passed informers and then waits for all of them to synchronize.
StartAll kicks off all of the passed controllers with DefaultThreadsPerController.
StartInformers kicks off all of the passed informers and then waits for all of them to synchronize.
WaitForCacheSyncQuick is the same as cache.WaitForCacheSync but with a much reduced check-rate for the sync period.
WithEventRecorder attaches the given record.EventRecorder to the provided context in the returned context.
WithResyncPeriod associates the given resync period with the given context in the context that is returned.
WithTracker attaches the given tracker.Interface to the provided context in the returned context.

# Constants

DefaultResyncPeriod is the default duration that is used when no resync period is associated with a controllers initialization context.

# Variables

DefaultThreadsPerController is the number of threads to use when processing the controller's workqueue.
NamespaceTagKey marks metrics with a namespace.

# Structs

ControllerOptions encapsulates options for creating a new controller, including throttling and stats behavior.
Impl is our core controller implementation.
Options is additional resources a Controller might want to use depending on implementation.

# Interfaces

Informer is the group of methods that a type must implement to be passed to StartInformers.
Reconciler is the interface that controller implementations are expected to implement, so that the shared controller.Impl can drive work through it.
StatsReporter defines the interface for sending metrics.

# Type aliases

Callback is a function that is passed to an informer's event handler.
OptionsFn is a callback method signature that accepts an Impl and returns Options.