cache

package
Version: v3.4.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TagMapKey

func TagMapKey(tags map[string]string) uint64

TagMapKey generates a new key based on tags.

Types

type StringInterner

type StringInterner struct {
	// contains filtered or unexported fields
}

StringInterner interns strings.

func NewStringInterner

func NewStringInterner() *StringInterner

NewStringInterner creates a new StringInterner.

func (*StringInterner) Intern

func (i *StringInterner) Intern(s string) string

Intern interns s.

type TagCache

type TagCache struct {
	// contains filtered or unexported fields
}

TagCache is an identity.Accumulator-based tag cache.

func NewTagCache

func NewTagCache() *TagCache

NewTagCache creates a new TagCache.

func (*TagCache) Get

func (c *TagCache) Get(key uint64) ([]m3thrift.MetricTag, bool)

Get returns the cached value for key.

func (*TagCache) Set

func (c *TagCache) Set(key uint64, tslice []m3thrift.MetricTag) []m3thrift.MetricTag

Set attempts to set the value of key as tslice, returning either tslice or the pre-existing value if found.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to