informer

package
v0.5.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: Apache-2.0 Imports: 16 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicDiscoverySharedInformerFactory

type DynamicDiscoverySharedInformerFactory struct {
	// contains filtered or unexported fields
}

DynamicDiscoverySharedInformerFactory is a SharedInformerFactory that dynamically discovers new types and begins informing on them.

func NewDynamicDiscoverySharedInformerFactory

func NewDynamicDiscoverySharedInformerFactory(
	workspaceLister tenancylisters.ClusterWorkspaceLister,
	disco clusterDiscovery,
	dynClient dynamic.Interface,
	filterFunc func(obj interface{}) bool,
	handler GVREventHandler,
	pollInterval time.Duration,
) DynamicDiscoverySharedInformerFactory

NewDynamicDiscoverySharedInformerFactory returns a factory for shared informers that discovers new types and informs on updates to resources of those types.

func (*DynamicDiscoverySharedInformerFactory) IndexerFor

IndexerFor returns the indexer for the given type GVR.

func (*DynamicDiscoverySharedInformerFactory) InformerForResource added in v0.6.0

InformerForResource returns the GenericInformer for gvr, creating it if needed.

func (*DynamicDiscoverySharedInformerFactory) Listers

Listers returns a map of per-resource-type listers for all types that are known by this informer factory, and that are synced.

If any informers aren't synced, their GVRs are returned so that they can be checked and processed later.

func (*DynamicDiscoverySharedInformerFactory) Start

type GVREventHandler

type GVREventHandler interface {
	OnAdd(gvr schema.GroupVersionResource, obj interface{})
	OnUpdate(gvr schema.GroupVersionResource, oldObj, newObj interface{})
	OnDelete(gvr schema.GroupVersionResource, obj interface{})
}

GVREventHandler is an event handler that includes the GroupVersionResource of the resource being handled.

type GVREventHandlerFuncs

type GVREventHandlerFuncs struct {
	AddFunc    func(gvr schema.GroupVersionResource, obj interface{})
	UpdateFunc func(gvr schema.GroupVersionResource, oldObj, newObj interface{})
	DeleteFunc func(gvr schema.GroupVersionResource, obj interface{})
}

func (GVREventHandlerFuncs) OnAdd

func (g GVREventHandlerFuncs) OnAdd(gvr schema.GroupVersionResource, obj interface{})

func (GVREventHandlerFuncs) OnDelete

func (g GVREventHandlerFuncs) OnDelete(gvr schema.GroupVersionResource, obj interface{})

func (GVREventHandlerFuncs) OnUpdate

func (g GVREventHandlerFuncs) OnUpdate(gvr schema.GroupVersionResource, oldObj, newObj interface{})

Jump to

Keyboard shortcuts

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