factory

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Overview

Package factory provides a cache factory for the sql-based cache.

Index

Constants

View Source
const EncryptAllEnvVar = "CATTLE_ENCRYPT_CACHE_ALL"

EncryptAllEnvVar is set to "true" if users want all types' data blobs to be encrypted in SQLite otherwise only variables in defaultEncryptedResourceTypes will have their blobs encrypted

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	informer.ByOptionsLister
}

type CacheFactory

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

CacheFactory builds Informer instances and keeps a cache of instances it created

func NewCacheFactory

func NewCacheFactory() (*CacheFactory, error)

NewCacheFactory returns an informer factory instance

func (*CacheFactory) CacheFor

func (f *CacheFactory) CacheFor(fields [][]string, transform cache.TransformFunc, client dynamic.ResourceInterface, gvk schema.GroupVersionKind, namespaced bool, watchable bool) (Cache, error)

CacheFor returns an informer for given GVK, using sql store indexed with fields, using the specified client. For virtual fields, they must be added by the transform function and specified by fields to be used for later fields.

func (*CacheFactory) Reset

func (f *CacheFactory) Reset() error

Reset closes the stopCh which stops any running informers, assigns a new stopCh, resets the GVK-informer cache, and resets the database connection which wipes any current sqlite database at the default location.

type DBClient

type DBClient interface {
	informer.DBClient
	sqlStore.DBClient
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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