Documentation ¶
Index ¶
- func GetStringValueFromMetadata(meta map[string]interface{}, key string) (string, error)
- type Key
- type Stats
- func (s Stats) Collect(ch chan<- prometheus.Metric)
- func (s *Stats) DeleteKeysByFilter(filters ...string)
- func (xmc Stats) Describe(ch chan<- *prometheus.Desc)
- func (s *Stats) DumpAll() map[string]kv.Item
- func (s *Stats) FilterKeys(filters ...string) map[string]kv.Item
- func (s *Stats) GetCounter(nodeID, rtype, version, podID, statName string) (int64, error)
- func (s *Stats) GetPercentageFailing(nodeID, rType, version string) float64
- func (s *Stats) GetString(nodeID, rtype, version, podID, statName string) (string, error)
- func (s *Stats) GetSubscribedPods(nodeID, rType string) map[string]int8
- func (s *Stats) IncrementCounter(nodeID, rType, version, podID, statName string, increment int64)
- func (s *Stats) ReportACK(nodeID, rType, version, podID string)
- func (s *Stats) ReportNACK(nodeID, rType, podID, nonce string) (int64, error)
- func (s *Stats) ReportRequest(nodeID, rType, podID string)
- func (s *Stats) RunGC(client kubernetes.Interface, namespace string, stopCh <-chan struct{}) error
- func (s *Stats) SetInt64(nodeID, rType, version, podID, statName string, value int64)
- func (s *Stats) SetString(nodeID, rType, version, podID, statName, value string)
- func (s *Stats) SetStringWithExpiration(nodeID, rType, version, podID, statName, value string, ...)
- func (s *Stats) WriteResponseNonce(nodeID, rType, version, podID, nonce string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Key ¶
func NewKeyFromString ¶
type Stats ¶
type Stats struct {
// contains filtered or unexported fields
}
The format of the keys in the cache is
<node-id>:<version>:<resource-type>:<pod-id>:<stat-name>
func (Stats) Collect ¶ added in v0.11.0
func (s Stats) Collect(ch chan<- prometheus.Metric)
Collect dumps all the keys in the stats cache. Then it creates constant metrics for each modeID/resourceType/pod on the fly based on the dumped returned data.
func (*Stats) DeleteKeysByFilter ¶
func (Stats) Describe ¶ added in v0.11.0
func (xmc Stats) Describe(ch chan<- *prometheus.Desc)
Describe is implemented with DescribeByCollect. That's possible because the Collect method will always return the same 4 metrics with the same 4 descriptors.
func (*Stats) GetCounter ¶
func (*Stats) GetPercentageFailing ¶
func (*Stats) GetSubscribedPods ¶
func (*Stats) IncrementCounter ¶
IncrementCounter increments the counter if it already exists or creates it if it doesn't. IncrementCount removes any expiration that the cache item might had previously.
func (*Stats) ReportNACK ¶
func (*Stats) ReportRequest ¶
func (*Stats) RunGC ¶ added in v0.11.0
func (s *Stats) RunGC(client kubernetes.Interface, namespace string, stopCh <-chan struct{}) error
func (*Stats) SetStringWithExpiration ¶
func (*Stats) WriteResponseNonce ¶
Click to show internal directories.
Click to hide internal directories.