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 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 ¶
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) EXPECT ¶
func (m *MockID) EXPECT() *MockIDMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
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 ¶
NameAndTagsFn returns the name and the tag pairs given an 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 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)