Documentation ¶
Index ¶
- Constants
- func EnhancedObjectKeyFunc(scheme *runtime.Scheme) func(obj interface{}) (string, error)
- func MeterDefinitionIndexFunc(obj interface{}) ([]string, error)
- func ProvideMeterDefinitionList(cacheIsStarted managers.CacheIsStarted, client runtimeClient.Client) (*v1beta1.MeterDefinitionList, error)
- type MeterDefinitionDictionary
- func (def *MeterDefinitionDictionary) Add(obj interface{}) error
- func (def *MeterDefinitionDictionary) AddIfNotPresent(obj interface{}) error
- func (def *MeterDefinitionDictionary) Close()
- func (def *MeterDefinitionDictionary) Delete(obj interface{}) error
- func (def *MeterDefinitionDictionary) FindObjectMatches(obj interface{}, results *[]filter.Result) error
- func (def *MeterDefinitionDictionary) Get(obj interface{}) (item interface{}, exists bool, err error)
- func (def *MeterDefinitionDictionary) GetByKey(key string) (item interface{}, exists bool, err error)
- func (def *MeterDefinitionDictionary) HasSynced() bool
- func (def *MeterDefinitionDictionary) List() []interface{}
- func (def *MeterDefinitionDictionary) ListFilters() ([]*filter.MeterDefinitionLookupFilter, error)
- func (def *MeterDefinitionDictionary) ListKeys() []string
- func (def *MeterDefinitionDictionary) Pop(process cache.PopProcessFunc) (interface{}, error)
- func (def *MeterDefinitionDictionary) Replace(in []interface{}, str string) error
- func (def *MeterDefinitionDictionary) Resync() error
- func (def *MeterDefinitionDictionary) Update(obj interface{}) error
- type MeterDefinitionExtended
- type MeterDefinitionStore
- func (s *MeterDefinitionStore) Add(obj interface{}) error
- func (s *MeterDefinitionStore) AddIfNotPresent(obj interface{}) error
- func (s *MeterDefinitionStore) ByIndex(indexName, indexedValue string) ([]interface{}, error)
- func (s *MeterDefinitionStore) Close()
- func (s *MeterDefinitionStore) Delete(obj interface{}) error
- func (s *MeterDefinitionStore) DeleteFromIndex(obj interface{}) error
- func (s *MeterDefinitionStore) Get(obj interface{}) (item interface{}, exists bool, err error)
- func (s *MeterDefinitionStore) GetByKey(key string) (item interface{}, exists bool, err error)
- func (s *MeterDefinitionStore) HasSynced() bool
- func (s *MeterDefinitionStore) List() []interface{}
- func (s *MeterDefinitionStore) ListKeys() []string
- func (s *MeterDefinitionStore) Pop(process cache.PopProcessFunc) (interface{}, error)
- func (s *MeterDefinitionStore) Replace(list []interface{}, _ string) error
- func (s *MeterDefinitionStore) Resync() error
- func (s *MeterDefinitionStore) SyncByIndex(indexName, indexedValue string) error
- func (s *MeterDefinitionStore) Update(obj interface{}) error
- type MeterDefinitionStores
Constants ¶
const IndexMeterDefinition = "meterDefinition"
const IndexNamespace = "namespace"
Variables ¶
This section is empty.
Functions ¶
func EnhancedObjectKeyFunc ¶
func ProvideMeterDefinitionList ¶
func ProvideMeterDefinitionList( cacheIsStarted managers.CacheIsStarted, client runtimeClient.Client, ) (*v1beta1.MeterDefinitionList, error)
Types ¶
type MeterDefinitionDictionary ¶
MeterDefinitionDictionary tracks the meterdefinitions current on the system and provides methods of checking if a resources is apart of the meterdefinition.
func NewMeterDefinitionDictionary ¶
func NewMeterDefinitionDictionary( ctx context.Context, namespaces pkgtypes.Namespaces, log logr.Logger, factory *filter.MeterDefinitionLookupFilterFactory, ) *MeterDefinitionDictionary
func (*MeterDefinitionDictionary) Add ¶
func (def *MeterDefinitionDictionary) Add(obj interface{}) error
Add adds the given object to the accumulator associated with the given object's key
func (*MeterDefinitionDictionary) AddIfNotPresent ¶
func (def *MeterDefinitionDictionary) AddIfNotPresent(obj interface{}) error
func (*MeterDefinitionDictionary) Close ¶
func (def *MeterDefinitionDictionary) Close()
func (*MeterDefinitionDictionary) Delete ¶
func (def *MeterDefinitionDictionary) Delete(obj interface{}) error
Delete deletes the given object from the accumulator associated with the given object's key
func (*MeterDefinitionDictionary) FindObjectMatches ¶
func (def *MeterDefinitionDictionary) FindObjectMatches( obj interface{}, results *[]filter.Result, ) error
func (*MeterDefinitionDictionary) Get ¶
func (def *MeterDefinitionDictionary) Get(obj interface{}) (item interface{}, exists bool, err error)
Get returns the accumulator associated with the given object's key
func (*MeterDefinitionDictionary) GetByKey ¶
func (def *MeterDefinitionDictionary) GetByKey(key string) (item interface{}, exists bool, err error)
GetByKey returns the accumulator associated with the given key
func (*MeterDefinitionDictionary) HasSynced ¶
func (def *MeterDefinitionDictionary) HasSynced() bool
func (*MeterDefinitionDictionary) List ¶
func (def *MeterDefinitionDictionary) List() []interface{}
List returns a list of all the currently non-empty accumulators
func (*MeterDefinitionDictionary) ListFilters ¶
func (def *MeterDefinitionDictionary) ListFilters() ([]*filter.MeterDefinitionLookupFilter, error)
func (*MeterDefinitionDictionary) ListKeys ¶
func (def *MeterDefinitionDictionary) ListKeys() []string
ListKeys returns a list of all the keys currently associated with non-empty accumulators
func (*MeterDefinitionDictionary) Pop ¶
func (def *MeterDefinitionDictionary) Pop(process cache.PopProcessFunc) (interface{}, error)
func (*MeterDefinitionDictionary) Replace ¶
func (def *MeterDefinitionDictionary) Replace(in []interface{}, str string) error
Replace will delete the contents of the store, using instead the given list. Store takes ownership of the list, you should not reference it after calling this function.
func (*MeterDefinitionDictionary) Resync ¶
func (def *MeterDefinitionDictionary) Resync() error
Resync is meaningless in the terms appearing here but has meaning in some implementations that have non-trivial additional behavior (e.g., DeltaFIFO).
func (*MeterDefinitionDictionary) Update ¶
func (def *MeterDefinitionDictionary) Update(obj interface{}) error
Update updates the given object in the accumulator associated with the given object's key
type MeterDefinitionExtended ¶
type MeterDefinitionExtended struct { *v1beta1.MeterDefinition Filter *filter.MeterDefinitionLookupFilter }
type MeterDefinitionStore ¶
MeterDefinitionStore keeps the MeterDefinitions in place and tracks the dependents using the rules based on the spec. MeterDefinition controller uses this to effectively find the child assets of a meter definition rules.
func NewMeterDefinitionStore ¶
func NewMeterDefinitionStore( ctx context.Context, log logr.Logger, dictionary *MeterDefinitionDictionary, scheme *runtime.Scheme, ) *MeterDefinitionStore
func (*MeterDefinitionStore) Add ¶
func (s *MeterDefinitionStore) Add(obj interface{}) error
Add inserts adds to the OwnerCache by calling the metrics generator functions and adding the generated metrics to the metrics map that underlies the MetricStore.
func (*MeterDefinitionStore) AddIfNotPresent ¶
func (s *MeterDefinitionStore) AddIfNotPresent(obj interface{}) error
func (*MeterDefinitionStore) ByIndex ¶
func (s *MeterDefinitionStore) ByIndex(indexName, indexedValue string) ([]interface{}, error)
func (*MeterDefinitionStore) Close ¶
func (s *MeterDefinitionStore) Close()
func (*MeterDefinitionStore) Delete ¶
func (s *MeterDefinitionStore) Delete(obj interface{}) error
Delete deletes an existing entry in the OwnerCache.
func (*MeterDefinitionStore) DeleteFromIndex ¶
func (s *MeterDefinitionStore) DeleteFromIndex(obj interface{}) error
Delete deletes an existing entry in the OwnerCache.
func (*MeterDefinitionStore) Get ¶
func (s *MeterDefinitionStore) Get(obj interface{}) (item interface{}, exists bool, err error)
Get implements the Get method of the store interface.
func (*MeterDefinitionStore) GetByKey ¶
func (s *MeterDefinitionStore) GetByKey(key string) (item interface{}, exists bool, err error)
GetByKey implements the GetByKey method of the store interface.
func (*MeterDefinitionStore) HasSynced ¶
func (s *MeterDefinitionStore) HasSynced() bool
func (*MeterDefinitionStore) List ¶
func (s *MeterDefinitionStore) List() []interface{}
List implements the List method of the store interface.
func (*MeterDefinitionStore) ListKeys ¶
func (s *MeterDefinitionStore) ListKeys() []string
ListKeys implements the ListKeys method of the store interface.
func (*MeterDefinitionStore) Pop ¶
func (s *MeterDefinitionStore) Pop(process cache.PopProcessFunc) (interface{}, error)
func (*MeterDefinitionStore) Replace ¶
func (s *MeterDefinitionStore) Replace(list []interface{}, _ string) error
Replace will delete the contents of the store, using instead the given list.
func (*MeterDefinitionStore) Resync ¶
func (s *MeterDefinitionStore) Resync() error
Resync implements the Resync method of the store interface. Resync walks the entire cache to refresh the Object matches to MeterDefinitions Updates and Delta deletes if the no MeterDefinitions match
func (*MeterDefinitionStore) SyncByIndex ¶
func (s *MeterDefinitionStore) SyncByIndex(indexName, indexedValue string) error
For a MeterDefinition event, Delta Add or Delete Objects if they still match
func (*MeterDefinitionStore) Update ¶
func (s *MeterDefinitionStore) Update(obj interface{}) error
Update updates the existing entry in the OwnerCache.
type MeterDefinitionStores ¶
type MeterDefinitionStores = map[string]*MeterDefinitionStore