Documentation
¶
Index ¶
- type Tracker
- func (t *Tracker) AppendBinary(b []byte) ([]byte, error)
- func (t *Tracker) CheckOverflow(f func() hash.Hash64) bool
- func (t *Tracker) Equal(other *Tracker) bool
- func (t *Tracker) EstimateOverflow() uint64
- func (t *Tracker) HasOverflow() bool
- func (t *Tracker) MergeEstimators(other *Tracker) error
- func (t *Tracker) Unmarshal(d []byte) (int, error)
- type Trackers
- func (t *Trackers) AppendBinary(b []byte) ([]byte, error)
- func (t *Trackers) GetDatapointTracker(i int) *Tracker
- func (t *Trackers) GetMetricTracker(i int) *Tracker
- func (t *Trackers) GetResourceTracker() *Tracker
- func (t *Trackers) GetScopeTracker(i int) *Tracker
- func (t *Trackers) NewDatapointTracker() *Tracker
- func (t *Trackers) NewMetricTracker() *Tracker
- func (t *Trackers) NewScopeTracker() *Tracker
- func (t *Trackers) Unmarshal(d []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker tracks the configured limits while merging. It records the observed count as well as the unique overflow counts.
func (*Tracker) AppendBinary ¶ added in v0.5.0
AppendBinary marshals the tracker and appends the result to b.
func (*Tracker) CheckOverflow ¶
CheckOverflow checks if overflow will happen on addition of a new entry with the provided hash denoting the entries ID. It assumes that any entry passed to this method is a NEW entry and the check for this is left to the caller.
func (*Tracker) EstimateOverflow ¶
func (*Tracker) HasOverflow ¶
func (*Tracker) MergeEstimators ¶
MergeEstimators merges the overflow estimators for the two trackers. Note that other required maintenance of the tracker for merge needs to done by the caller.
type Trackers ¶
type Trackers struct {
// contains filtered or unexported fields
}
Trackers represent multiple tracker in an ordered structure. It takes advantage of the fact that pmetric DS is ordered and thus allows trackers to be created for each resource, scope, and datapoint independent of the pmetric datastructure. Note that this means that the order for pmetric and trackers are implicitly related and removing/adding new objects to pmetric should be accompanied by adding a corresponding tracker.