resourcecache

package
v1.5.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KyvernoDefaultInformer = []string{"ConfigMap", "Deployment", "MutatingWebhookConfiguration", "ValidatingWebhookConfiguration"}

Functions

This section is empty.

Types

type GenericCache added in v1.3.2

type GenericCache interface {
	StopInformer()
	IsNamespaced() bool
	Lister() dynamiclister.Lister
	NamespacedLister(namespace string) dynamiclister.NamespaceLister
	GVR() schema.GroupVersionResource
	GetInformer() cache.SharedIndexInformer
}

GenericCache - allows operation on a single resource

func NewGVRCache

func NewGVRCache(gvr schema.GroupVersionResource, namespaced bool, stopCh chan struct{}, genericInformer informers.GenericInformer) GenericCache

NewGVRCache ...

type ResourceCache

type ResourceCache interface {
	CreateInformers(gvks ...string) []error
	CreateGVKInformer(gvk string) (GenericCache, error)
	StopResourceInformer(gvk string)
	GetGVRCache(gvk string) (GenericCache, bool)
}

ResourceCache - allows the creation, deletion and saving the resource informers as a cache the resource cache can be registered by gvks as follows: - group/version/kind - group/kind - kind

func NewResourceCache

func NewResourceCache(dclient *dclient.Client, dInformer dynamicinformer.DynamicSharedInformerFactory, logger logr.Logger) (ResourceCache, error)

NewResourceCache - initializes the ResourceCache

Jump to

Keyboard shortcuts

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