dynamiclister

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicResourceLister

type DynamicResourceLister interface {
	// RegisterNewResource add new type of gvr to cache and sync to cache.
	// If second param waitForSync is true, then it will wait for sync data finish.
	// It returns nil if gvk exist in mem cache or add success, otherwise return an error.
	RegisterNewResource(waitForSync bool, gvkList ...schema.GroupVersionKind) error
	// GVKToResourceLister try load resource lister from local cache, if not found in local then request
	// k8s api to get resource.
	GVKToResourceLister(schema.GroupVersionKind) (cache.GenericLister, error)
}

DynamicResourceLister define a cached dynamic resource lister

func NewDynamicResourceLister

func NewDynamicResourceLister(cfg *rest.Config, done <-chan struct{}) (DynamicResourceLister, error)

NewDynamicResourceLister init DynamicResourceLister implemented by dynamicResourceListerImpl.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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