Documentation
¶
Index ¶
- func TagMapKey(tags map[string]string) uint64
- type StringInterner
- type TagCache
- func (c *TagCache) CleanupExpired() int
- func (c *TagCache) Clear()
- func (c *TagCache) Get(key uint64) ([]m3thrift.MetricTag, bool)
- func (c *TagCache) Len() int
- func (c *TagCache) Set(key uint64, tslice []m3thrift.MetricTag) []m3thrift.MetricTag
- func (c *TagCache) Stats() (hits, misses, evictions int64, hitRate float64)
- type TagCacheOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StringInterner ¶
type StringInterner struct {
// contains filtered or unexported fields
}
StringInterner interns strings.
func NewStringInterner ¶
func NewStringInterner() *StringInterner
NewStringInterner creates a new StringInterner.
type TagCache ¶
type TagCache struct {
// contains filtered or unexported fields
}
TagCache is an identity.Accumulator-based tag cache with LRU eviction.
func NewTagCache ¶
func NewTagCache() *TagCache
NewTagCache creates a new TagCache with default settings.
func NewTagCacheWithOptions ¶
func NewTagCacheWithOptions(opts TagCacheOptions) *TagCache
NewTagCacheWithOptions creates a new TagCache with specified options.
func (*TagCache) CleanupExpired ¶
CleanupExpired removes expired entries (useful for periodic cleanup).
type TagCacheOptions ¶
type TagCacheOptions struct {
MaxSize int // Maximum number of entries (default: 10000)
TTLSeconds int64 // TTL in seconds, 0 means no TTL (default: 3600 = 1 hour)
}
TagCacheOptions configures the TagCache behavior
Click to show internal directories.
Click to hide internal directories.