Documentation ¶
Index ¶
- type ContainerID
- type DatapointCache
- func (dc *DatapointCache) AllDatapoints() []*datapoint.Datapoint
- func (dc *DatapointCache) AllDimProperties() []*atypes.DimProperties
- func (dc *DatapointCache) DeleteByKey(key interface{})
- func (dc *DatapointCache) HandleAdd(newObj runtime.Object) interface{}
- func (dc *DatapointCache) HandleDelete(oldObj runtime.Object) interface{}
- func (dc *DatapointCache) Lock()
- func (dc *DatapointCache) Unlock()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatapointCache ¶
type DatapointCache struct {
// contains filtered or unexported fields
}
DatapointCache holds an up to date copy of datapoints pertaining to the cluster. It is updated whenever the HandleChange method is called with new K8s resources.
func NewDatapointCache ¶
func NewDatapointCache() *DatapointCache
NewDatapointCache creates a new clean cache
func (*DatapointCache) AllDatapoints ¶
func (dc *DatapointCache) AllDatapoints() []*datapoint.Datapoint
AllDatapoints returns all of the cached datapoints.
func (*DatapointCache) AllDimProperties ¶
func (dc *DatapointCache) AllDimProperties() []*atypes.DimProperties
AllDimProperties returns any dimension properties pertaining to the cluster
func (*DatapointCache) DeleteByKey ¶
func (dc *DatapointCache) DeleteByKey(key interface{})
DeleteByKey delete a cache entry by key. The supplied interface MUST be the same type returned by Handle[Add|Delete]. MUST HOLD LOCK!
func (*DatapointCache) HandleAdd ¶
func (dc *DatapointCache) HandleAdd(newObj runtime.Object) interface{}
HandleAdd accepts a new (or updated) object and updates the datapoint/prop cache as needed. MUST HOLD LOCK!!
func (*DatapointCache) HandleDelete ¶
func (dc *DatapointCache) HandleDelete(oldObj runtime.Object) interface{}
HandleDelete accepts an object that has been deleted and removes the associated datapoints/props from the cache. MUST HOLD LOCK!!
func (*DatapointCache) Lock ¶
func (dc *DatapointCache) Lock()
Lock allows users of the cache to lock it when doing complex operations
func (*DatapointCache) Unlock ¶
func (dc *DatapointCache) Unlock()
Unlock allows users of the cache to unlock it after doing complex operations