Documentation ¶
Index ¶
- func FieldIndexName(field string) string
- func KeyToNamespacedKey(ns string, baseKey string) string
- func NewODLMCache(isolatedModeEnable bool, namespaces []string, ...) cache.NewCacheFunc
- type ODLMCache
- func (c ODLMCache) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (c ODLMCache) GetInformer(ctx context.Context, obj client.Object) (cache.Informer, error)
- func (c ODLMCache) GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind) (cache.Informer, error)
- func (c ODLMCache) IndexField(ctx context.Context, obj client.Object, field string, ...) error
- func (c ODLMCache) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (c ODLMCache) Start(ctx context.Context) error
- func (c ODLMCache) WaitForCacheSync(ctx context.Context) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldIndexName ¶
FieldIndexName constructs the name of the index over the given field, for use with an indexer.
func KeyToNamespacedKey ¶
KeyToNamespacedKey prefixes the given index key with a namespace for use in field selector indexes.
func NewODLMCache ¶
func NewODLMCache(isolatedModeEnable bool, namespaces []string, gvkLabelMap map[schema.GroupVersionKind]filteredcache.Selector) cache.NewCacheFunc
NewODLMCache implements a customized cache with a for ODLM
Types ¶
type ODLMCache ¶
ODLMCache is the customized cache for ODLM
func (ODLMCache) Get ¶
Get implements Reader If the resource is in the cache, Get function get fetch in from the informer Otherwise, resource will be get by the k8s client
func (ODLMCache) GetInformer ¶
GetInformer fetches or constructs an informer for the given object that corresponds to a single API kind and resource.
func (ODLMCache) GetInformerForKind ¶
func (c ODLMCache) GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind) (cache.Informer, error)
GetInformerForKind is similar to GetInformer, except that it takes a group-version-kind, instead of the underlying object.
func (ODLMCache) IndexField ¶
func (c ODLMCache) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error
IndexField adds an indexer to the underlying cache, using extraction function to get value(s) from the given field. The filtered cache doesn't support the index yet.
func (ODLMCache) List ¶
func (c ODLMCache) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List lists items out of the indexer and writes them to list