Documentation ¶
Index ¶
- func FieldIndexName(field string) string
- func KeyToNamespacedKey(ns string, baseKey string) string
- type Cache
- func (c *Cache) Get(ctx context.Context, key client.ObjectKey, obj client.Object) error
- func (c *Cache) GetInformer(ctx context.Context, obj client.Object) (cache.Informer, error)
- func (c *Cache) GetInformerForKind(ctx context.Context, gvk schema.GroupVersionKind) (cache.Informer, error)
- func (c *Cache) IndexField(ctx context.Context, obj client.Object, field string, ...) error
- func (c *Cache) List(ctx context.Context, listObj client.ObjectList, opts ...client.ListOption) error
- func (c *Cache) Start(ctx context.Context) error
- func (c *Cache) 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.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetInformer ¶
func (*Cache) GetInformerForKind ¶
func (*Cache) IndexField ¶
func (c *Cache) 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. This index can then be used by passing a field selector to List. For one-to-one compatibility with "normal" field selectors, only return one value. The values may be anything. They will automatically be prefixed with the namespace of the given object, if present. The objects passed are guaranteed to be objects of the correct type.
func (*Cache) List ¶
func (c *Cache) List(ctx context.Context, listObj client.ObjectList, opts ...client.ListOption) error
Click to show internal directories.
Click to hide internal directories.