Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
// Get returns the decision for the given id, and a boolean to indicate whether the key was found.
// Returning a zero value for DecisionMetadata is valid for caches that do not store metadata.
// Callers should check the boolean return value to determine if the key was found.
Get(id pcommon.TraceID) (DecisionMetadata, bool)
// Put sets the decision for a given id. If the key is already present, the decision is overwritten.
Put(id pcommon.TraceID, metadata DecisionMetadata)
}
Cache is a cache implementation for the tailsamplingprocessor's decision cache.
func NewLRUDecisionCache ¶
NewLRUDecisionCache returns a new lruDecisionCache. The size parameter indicates the amount of keys the cache will hold before it starts evicting the least recently used key.
func NewNopDecisionCache ¶
func NewNopDecisionCache() Cache
type DecisionMetadata ¶ added in v0.143.0
type DecisionMetadata struct {
PolicyName string
}
Click to show internal directories.
Click to hide internal directories.