Documentation ¶
Overview ¶
Package poolcache implements a simple cache implementation having values mapped by two keys. As of now this package is only used by poolmanager executor
Index ¶
- type Cache
- func (c *Cache) DeleteValue(ctx context.Context, function, address interface{}) error
- func (c *Cache) GetValue(ctx context.Context, function interface{}, requestsPerPod int) (interface{}, int, error)
- func (c *Cache) ListAvailableValue() []interface{}
- func (c *Cache) MarkAvailable(function, address interface{})
- func (c *Cache) SetCPUUtilization(function, address interface{}, cpuUsage resource.Quantity)
- func (c *Cache) SetValue(ctx context.Context, function, address, value interface{}, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is simple cache having two keys [function][address] mapped to value and requestChannel for operation on it
func (*Cache) DeleteValue ¶
DeleteValue deletes the value at key composed of [function][address]
func (*Cache) GetValue ¶
func (c *Cache) GetValue(ctx context.Context, function interface{}, requestsPerPod int) (interface{}, int, error)
GetValue returns a value interface with status inActive else return error
func (*Cache) ListAvailableValue ¶
func (c *Cache) ListAvailableValue() []interface{}
ListAvailableValue returns a list of the available function services stored in the Cache
func (*Cache) MarkAvailable ¶
func (c *Cache) MarkAvailable(function, address interface{})
MarkAvailable marks the value at key [function][address] as available
func (*Cache) SetCPUUtilization ¶
SetCPUUtilization updates/sets the CPU utilization limit for the pod