Documentation ¶
Index ¶
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 CacheReader ¶
type CacheReader struct {
// contains filtered or unexported fields
}
CacheReader wraps a cache.Index to implement the client.CacheReader interface for a single type
func (*CacheReader) List ¶
func (c *CacheReader) List(ctx context.Context, opts *client.ListOptions, out runtime.Object) error
List lists items out of the indexer and writes them to out
type InformersMap ¶
type InformersMap struct { // Scheme maps runtime.Objects to GroupVersionKinds Scheme *runtime.Scheme // contains filtered or unexported fields }
InformersMap create and caches Informers for (runtime.Object, schema.GroupVersionKind) pairs. It uses a standard parameter codec constructed based on the given generated Scheme.
func NewInformersMap ¶
func NewInformersMap(config *rest.Config, scheme *runtime.Scheme, mapper meta.RESTMapper, resync time.Duration) *InformersMap
NewInformersMap returns a new InformersMap
func (*InformersMap) Get ¶
func (ip *InformersMap) Get(gvk schema.GroupVersionKind, obj runtime.Object) (*MapEntry, error)
Get will create a new Informer and add it to the map of InformersMap if none exists. Returns the Informer from the map.
func (*InformersMap) Start ¶
func (ip *InformersMap) Start(stop <-chan struct{}) error
Start calls Run on each of the informers and sets started to true. Blocks on the stop channel.
func (*InformersMap) WaitForCacheSync ¶
func (ip *InformersMap) WaitForCacheSync(stop <-chan struct{}) bool
WaitForCacheSync waits until all the caches have been synced
type MapEntry ¶
type MapEntry struct { // Informer is the cached informer Informer cache.SharedIndexInformer // CacheReader wraps Informer and implements the CacheReader interface for a single type Reader CacheReader }
MapEntry contains the cached data for an Informer