id

package
Version: v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 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 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 MockSortedTagIterator added in v1.0.1

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

MockSortedTagIterator is a mock of SortedTagIterator interface.

func NewMockSortedTagIterator added in v1.0.1

func NewMockSortedTagIterator(ctrl *gomock.Controller) *MockSortedTagIterator

NewMockSortedTagIterator creates a new mock instance.

func (*MockSortedTagIterator) Close added in v1.0.1

func (m *MockSortedTagIterator) Close()

Close mocks base method.

func (*MockSortedTagIterator) Current added in v1.0.1

func (m *MockSortedTagIterator) Current() ([]byte, []byte)

Current mocks base method.

func (*MockSortedTagIterator) EXPECT added in v1.0.1

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

func (*MockSortedTagIterator) Err added in v1.0.1

func (m *MockSortedTagIterator) Err() error

Err mocks base method.

func (*MockSortedTagIterator) Next added in v1.0.1

func (m *MockSortedTagIterator) Next() bool

Next mocks base method.

func (*MockSortedTagIterator) Reset added in v1.0.1

func (m *MockSortedTagIterator) Reset(arg0 []byte)

Reset mocks base method.

type MockSortedTagIteratorMockRecorder added in v1.0.1

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

MockSortedTagIteratorMockRecorder is the mock recorder for MockSortedTagIterator.

func (*MockSortedTagIteratorMockRecorder) Close added in v1.0.1

Close indicates an expected call of Close.

func (*MockSortedTagIteratorMockRecorder) Current added in v1.0.1

Current indicates an expected call of Current.

func (*MockSortedTagIteratorMockRecorder) Err added in v1.0.1

Err indicates an expected call of Err.

func (*MockSortedTagIteratorMockRecorder) Next added in v1.0.1

Next indicates an expected call of Next.

func (*MockSortedTagIteratorMockRecorder) Reset added in v1.0.1

func (mr *MockSortedTagIteratorMockRecorder) Reset(arg0 interface{}) *gomock.Call

Reset indicates an expected call of Reset.

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 returns a sorted tag iterator over the provided 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