dynamiccache

package
v0.0.0-...-48ed4f0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0, Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package cache provides object caches that act as caching client.Reader instances and help drive Kubernetes-object-based event handlers. The code is forked from controller-runtime's cache package and has been modified to support dynamic addition and removal of informers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config *rest.Config, opts cache.Options) (cache.Cache, error)

New initializes and returns a new Cache.

Types

type ErrCacheNotStarted

type ErrCacheNotStarted struct{}

ErrCacheNotStarted is returned when trying to read from the cache that wasn't started.

func (*ErrCacheNotStarted) Error

func (*ErrCacheNotStarted) Error() string

type NewCacheFunc

type NewCacheFunc func(config *rest.Config, opts cache.Options) (cache.Cache, error)

NewCacheFunc - Function for creating a new cache from the options and a rest config.

func BuilderWithOptions

func BuilderWithOptions(options cache.Options) NewCacheFunc

BuilderWithOptions returns a Cache constructor that will build a cache honoring the options argument, this is useful to specify options like SelectorsByObject WARNING: If SelectorsByObject is specified, filtered out resources are not returned. WARNING: If UnsafeDisableDeepCopy is enabled, you must DeepCopy any object returned from cache get/list before mutating it.

func MultiNamespacedCacheBuilder

func MultiNamespacedCacheBuilder(namespaces []string) NewCacheFunc

MultiNamespacedCacheBuilder - Builder function to create a new multi-namespaced cache. This will scope the cache to a list of namespaces. Listing for all namespaces will list for all the namespaces that this knows about. By default this will create a global cache for cluster scoped resource. Note that this is not intended to be used for excluding namespaces, this is better done via a Predicate. Also note that you may face performance issues when using this with a high number of namespaces.

type ObjectAll

type ObjectAll struct {
	client.Object
}

ObjectAll is the argument to represent all objects' types.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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