cache

package
v0.0.0-...-701e919 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 15 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(obj, listObj runtime.Object, client *client.Client, opts *Options) cache.SharedIndexInformer

Types

type CancelCollection

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

func (*CancelCollection) Add

func (c *CancelCollection) Add(ctx context.Context, obj interface{})

func (*CancelCollection) List

func (c *CancelCollection) List() (result []interface{})

type Options

type Options struct {
	Namespace   string
	Resync      time.Duration
	TweakList   TweakListOptionsFunc
	WaitHealthy func(ctx context.Context)
}

type SharedCacheFactory

type SharedCacheFactory interface {
	Start(ctx context.Context) error
	StartGVK(ctx context.Context, gvk schema.GroupVersionKind) error
	ForObject(obj runtime.Object) (cache.SharedIndexInformer, error)
	ForKind(gvk schema.GroupVersionKind) (cache.SharedIndexInformer, error)
	ForResource(gvr schema.GroupVersionResource, namespaced bool) (cache.SharedIndexInformer, error)
	ForResourceKind(gvr schema.GroupVersionResource, kind string, namespaced bool) (cache.SharedIndexInformer, error)
	WaitForCacheSync(ctx context.Context) map[schema.GroupVersionKind]bool
	SharedClientFactory() client.SharedClientFactory
}

func NewSharedCachedFactory

func NewSharedCachedFactory(sharedClientFactory client.SharedClientFactory, opts *SharedCacheFactoryOptions) SharedCacheFactory

NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options.

type SharedCacheFactoryOptions

type SharedCacheFactoryOptions struct {
	DefaultResync    time.Duration
	DefaultNamespace string
	DefaultTweakList TweakListOptionsFunc

	KindResync     map[schema.GroupVersionKind]time.Duration
	KindNamespace  map[schema.GroupVersionKind]string
	KindTweakList  map[schema.GroupVersionKind]TweakListOptionsFunc
	HealthCallback func(healthy bool)
}

type TweakListOptionsFunc

type TweakListOptionsFunc func(*v1.ListOptions)

Directories

Path Synopsis
sql
attachdriver
Package attachdriver provides a sqlite driver that wraps any other driver and attaches a database at a given path when a connection is opened.
Package attachdriver provides a sqlite driver that wraps any other driver and attaches a database at a given path when a connection is opened.
db
Package db offers client struct and functions to interact with database connection.
Package db offers client struct and functions to interact with database connection.
db/transaction
Package transaction provides a client for a live transaction, and interfaces for some relevant sql types.
Package transaction provides a client for a live transaction, and interfaces for some relevant sql types.
informer/factory
Package factory provides an cache factory for the sql-based cache.
Package factory provides an cache factory for the sql-based cache.
partition
Package partition represents listing parameters.
Package partition represents listing parameters.
store
Package store contains the sql backed store.
Package store contains the sql backed store.

Jump to

Keyboard shortcuts

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