id

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 38

Documentation

Overview

Package id is a generated GoMock package.

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
}

MockID is a mock of ID interface

func NewMockID

func NewMockID(ctrl *gomock.Controller) *MockID

NewMockID creates a new mock instance

func (*MockID) Bytes

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

Bytes mocks base method

func (*MockID) EXPECT

func (m *MockID) EXPECT() *MockIDMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockID) TagValue

func (m *MockID) TagValue(arg0 []byte) ([]byte, bool)

TagValue mocks base method

type MockIDMockRecorder

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

MockIDMockRecorder is the mock recorder for MockID

func (*MockIDMockRecorder) Bytes

func (mr *MockIDMockRecorder) Bytes() *gomock.Call

Bytes indicates an expected call of Bytes

func (*MockIDMockRecorder) TagValue

func (mr *MockIDMockRecorder) TagValue(arg0 interface{}) *gomock.Call

TagValue indicates an expected call of TagValue

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