id

package
v0.0.0-...-5c6aed3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkedID

type ChunkedID struct {
	Prefix []byte
	Data   []byte
	Suffix []byte
}

ChunkedID is a three-part id.

func (ChunkedID) String

func (cid ChunkedID) String() string

String is the string representation of the chunked id.

type ID

type ID interface {
	// Bytes returns the raw bytes for this id.
	Bytes() []byte

	// TagValue looks up the tag value for a tag name.
	TagValue(tagName []byte) ([]byte, bool)
}

ID is a metric id.

type MatchIDFn

type MatchIDFn func(name []byte, tags []byte) bool

MatchIDFn determines whether an id is considered "matched" based on certain criteria.

type MockID

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

Mock of ID interface

func NewMockID

func NewMockID(ctrl *gomock.Controller) *MockID

func (*MockID) Bytes

func (_m *MockID) Bytes() []byte

func (*MockID) EXPECT

func (_m *MockID) EXPECT() *_MockIDRecorder

func (*MockID) TagValue

func (_m *MockID) TagValue(_param0 []byte) ([]byte, bool)

type NameAndTagsFn

type NameAndTagsFn func(id []byte) (name []byte, tags []byte, err error)

NameAndTagsFn returns the name and the tag pairs given an id.

type NewIDFn

type NewIDFn func(name []byte, tags []TagPair) []byte

NewIDFn creates a new metric ID based on the metric name and metric tag pairs.

type RawID

type RawID []byte

RawID is the raw metric id.

func (RawID) String

func (rid RawID) String() string

String is the string representation of a raw id.

type SortedTagIterator

type SortedTagIterator interface {
	// Reset resets the iterator.
	Reset(sortedTagPairs []byte)

	// Next returns true if there are more tag names and values.
	Next() bool

	// Current returns the current tag name and value.
	Current() ([]byte, []byte)

	// Err returns any errors encountered.
	Err() error

	// Close closes the iterator.
	Close()
}

SortedTagIterator iterates over a set of tag pairs sorted by tag names.

type SortedTagIteratorAlloc

type SortedTagIteratorAlloc func() SortedTagIterator

SortedTagIteratorAlloc allocates a new sorted tag iterator.

type SortedTagIteratorFn

type SortedTagIteratorFn func(tagPairs []byte) SortedTagIterator

SortedTagIteratorFn creates a new sorted tag iterator given id tag pairs.

type SortedTagIteratorPool

type SortedTagIteratorPool interface {
	// Init initializes the iterator pool.
	Init(alloc SortedTagIteratorAlloc)

	// Get gets an iterator from the pool.
	Get() SortedTagIterator

	// Put returns an iterator to the pool.
	Put(value SortedTagIterator)
}

SortedTagIteratorPool is a pool of sorted tag iterators.

func NewSortedTagIteratorPool

func NewSortedTagIteratorPool(opts pool.ObjectPoolOptions) SortedTagIteratorPool

NewSortedTagIteratorPool creates a new pool for sorted tag iterators.

type TagPair

type TagPair struct {
	Name  []byte
	Value []byte
}

TagPair contains a tag name and a tag value.

type TagPairsByNameAsc

type TagPairsByNameAsc []TagPair

TagPairsByNameAsc sorts the tag pairs by tag names in ascending order.

func (TagPairsByNameAsc) Len

func (tp TagPairsByNameAsc) Len() int

func (TagPairsByNameAsc) Less

func (tp TagPairsByNameAsc) Less(i, j int) bool

func (TagPairsByNameAsc) Swap

func (tp TagPairsByNameAsc) Swap(i, j int)

Directories

Path Synopsis
Package m3 describes m3 metric id information.
Package m3 describes m3 metric id information.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL