encoding

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 17 Imported by: 46

Documentation

Overview

Package encoding is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeadingAndTrailingZeros

func LeadingAndTrailingZeros(v uint64) (int, int)

LeadingAndTrailingZeros calculates the number of leading and trailing 0s for a uint64

func NumSig

func NumSig(v uint64) uint8

NumSig returns the number of significant values in a uint64

func SignExtend

func SignExtend(v uint64, numBits int) int64

SignExtend sign extends the highest bit of v which has numBits (<=64)

func WriteSpecialMarker

func WriteSpecialMarker(os OStream, scheme MarkerEncodingScheme, marker Marker)

WriteSpecialMarker writes the marker that marks the start of a special symbol, e.g., the eos marker, the annotation marker, or the time unit marker.

Types

type Bit

type Bit byte

Bit is just a byte

type Decoder

type Decoder interface {
	// Decode decodes the encoded data in the reader.
	Decode(reader io.Reader) ReaderIterator
}

Decoder is the generic interface for different types of decoders.

type Encoder

type Encoder interface {
	// Encode encodes a datapoint and optionally an annotation.
	Encode(dp ts.Datapoint, unit xtime.Unit, annotation ts.Annotation) error

	// Stream is the streaming interface for reading encoded bytes in the encoder.
	Stream() xio.SegmentReader

	// NumEncoded returns the number of encoded datapoints.
	NumEncoded() int

	// LastEncoded returns the last encoded datapoint, useful for
	// de-duplicating encoded values. If there are no previously encoded values
	// an error is returned.
	LastEncoded() (ts.Datapoint, error)

	// Len returns the length of the encoded bytes in the encoder.
	Len() int

	// Reset resets the start time of the encoder and the internal state.
	Reset(t time.Time, capacity int)

	// Close closes the encoder and if pooled will return to the pool.
	Close()

	// Discard will take ownership of the encoder data and if pooled will return to the pool.
	Discard() ts.Segment

	// DiscardReset will take ownership of the encoder data and reset the encoder for use.
	DiscardReset(t time.Time, capacity int) ts.Segment
}

Encoder is the generic interface for different types of encoders.

func NewNullEncoder

func NewNullEncoder() Encoder

NewNullEncoder returns a new encoder that performs no operations

type EncoderAllocate

type EncoderAllocate func() Encoder

EncoderAllocate allocates an encoder for a pool.

type EncoderPool

type EncoderPool interface {
	// Init initializes the pool.
	Init(alloc EncoderAllocate)

	// Get provides an encoder from the pool
	Get() Encoder

	// Put returns an encoder to the pool
	Put(e Encoder)
}

EncoderPool provides a pool for encoders

func NewEncoderPool

func NewEncoderPool(opts pool.ObjectPoolOptions) EncoderPool

NewEncoderPool creates a new pool

type IStream

type IStream interface {
	ReadBit() (Bit, error)
	ReadByte() (byte, error)
	ReadBits(numBits int) (uint64, error)
	PeekBits(numBits int) (uint64, error)
	Reset(r io.Reader)
}

IStream encapsulates a readable stream.

func NewIStream

func NewIStream(reader io.Reader) IStream

NewIStream creates a new Istream

type IterateEqualTimestampStrategy added in v0.4.4

type IterateEqualTimestampStrategy uint8

IterateEqualTimestampStrategy describes the strategy of which value to select when values with equal timestamps appear in the list of iterators.

const (
	// IterateLastPushed is useful for within a single replica, using the last
	// immutable buffer that was created to decide which value to choose. It is
	// important to order the buffers passed to the construction of the iterators
	// in the correct order to achieve the desired outcome.
	IterateLastPushed IterateEqualTimestampStrategy = iota
	// IterateHighestValue is useful across replicas when you just want to choose
	// the highest value every time.
	IterateHighestValue
	// IterateLowestValue is useful across replicas when you just want to choose
	// the lowest value every time.
	IterateLowestValue
	// IterateHighestFrequencyValue is useful across replicas when you want to
	// choose the most common appearing value, however you can only use this
	// reliably if you wait for values from all replicas to be retrieved, i.e.
	// you cannot use this reliably with quorum/majority consistency.
	IterateHighestFrequencyValue

	// DefaultIterateEqualTimestampStrategy is the default iterate
	// equal timestamp strategy.
	DefaultIterateEqualTimestampStrategy = IterateLastPushed
)

func ParseIterateEqualTimestampStrategy added in v0.4.4

func ParseIterateEqualTimestampStrategy(
	str string,
) (IterateEqualTimestampStrategy, error)

ParseIterateEqualTimestampStrategy parses a IterateEqualTimestampStrategy from a string.

func ValidIterateEqualTimestampStrategies added in v0.4.4

func ValidIterateEqualTimestampStrategies() []IterateEqualTimestampStrategy

ValidIterateEqualTimestampStrategies returns the valid iterate equal timestamp strategies.

func (IterateEqualTimestampStrategy) String added in v0.4.4

func (*IterateEqualTimestampStrategy) UnmarshalYAML added in v0.4.4

func (s *IterateEqualTimestampStrategy) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals an IterateEqualTimestampStrategy into a valid type from string.

type Iterator

type Iterator interface {
	// Next moves to the next item
	Next() bool

	// Current returns the value as well as the annotation associated with the current datapoint.
	// Users should not hold on to the returned Annotation object as it may get invalidated when
	// the iterator calls Next().
	Current() (ts.Datapoint, xtime.Unit, ts.Annotation)

	// Err returns the error encountered
	Err() error

	// Close closes the iterator and if pooled will return to the pool.
	Close()
}

Iterator is the generic interface for iterating over encoded data.

type IteratorPools

type IteratorPools interface {
	// MultiReaderIteratorArray exposes the session's MultiReaderIteratorArrayPool
	MultiReaderIteratorArray() MultiReaderIteratorArrayPool
	// MultiReaderIterator exposes the session's MultiReaderIteratorPool
	MultiReaderIterator() MultiReaderIteratorPool
	// MutableSeriesIterators exposes the session's MutableSeriesIteratorsPool
	MutableSeriesIterators() MutableSeriesIteratorsPool
	// SeriesIterator exposes the session's SeriesIteratorPool
	SeriesIterator() SeriesIteratorPool
	// CheckedBytesWrapper exposes the session's CheckedBytesWrapperPool
	CheckedBytesWrapper() xpool.CheckedBytesWrapperPool
	// ID exposes the session's identity pool
	ID() ident.Pool
	// TagEncoder exposes the session's tag encoder pool
	TagEncoder() serialize.TagEncoderPool
	// TagDecoder exposes the session's tag decoder pool
	TagDecoder() serialize.TagDecoderPool
}

IteratorPools exposes a small subset of iterator pools that are sufficient for clients to rebuild SeriesIterator

type Marker

type Marker byte

Marker represents the markers.

type MarkerEncodingScheme

type MarkerEncodingScheme interface {

	// Opcode returns the marker opcode.
	Opcode() uint64

	// NumOpcodeBits returns the number of bits used for the opcode.
	NumOpcodeBits() int

	// NumValueBits returns the number of bits used for the marker value.
	NumValueBits() int

	// EndOfStream returns the end of stream marker.
	EndOfStream() Marker

	// Annotation returns the annotation marker.
	Annotation() Marker

	// TimeUnit returns the time unit marker.
	TimeUnit() Marker

	// Tail will return the tail portion of a stream including the relevant bits
	// in the last byte along with the end of stream marker.
	Tail(streamLastByte byte, streamCurrentPosition int) checked.Bytes
}

MarkerEncodingScheme captures the information related to marker encoding.

type MockDecoder

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

MockDecoder is a mock of Decoder interface

func NewMockDecoder

func NewMockDecoder(ctrl *gomock.Controller) *MockDecoder

NewMockDecoder creates a new mock instance

func (*MockDecoder) Decode

func (m *MockDecoder) Decode(reader io.Reader) ReaderIterator

Decode mocks base method

func (*MockDecoder) EXPECT

func (m *MockDecoder) EXPECT() *MockDecoderMockRecorder

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

type MockDecoderMockRecorder

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

MockDecoderMockRecorder is the mock recorder for MockDecoder

func (*MockDecoderMockRecorder) Decode

func (mr *MockDecoderMockRecorder) Decode(reader interface{}) *gomock.Call

Decode indicates an expected call of Decode

type MockEncoder

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

MockEncoder is a mock of Encoder interface

func NewMockEncoder

func NewMockEncoder(ctrl *gomock.Controller) *MockEncoder

NewMockEncoder creates a new mock instance

func (*MockEncoder) Close

func (m *MockEncoder) Close()

Close mocks base method

func (*MockEncoder) Discard

func (m *MockEncoder) Discard() ts.Segment

Discard mocks base method

func (*MockEncoder) DiscardReset

func (m *MockEncoder) DiscardReset(t time.Time, capacity int) ts.Segment

DiscardReset mocks base method

func (*MockEncoder) EXPECT

func (m *MockEncoder) EXPECT() *MockEncoderMockRecorder

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

func (*MockEncoder) Encode

func (m *MockEncoder) Encode(dp ts.Datapoint, unit time0.Unit, annotation ts.Annotation) error

Encode mocks base method

func (*MockEncoder) LastEncoded added in v0.4.4

func (m *MockEncoder) LastEncoded() (ts.Datapoint, error)

LastEncoded mocks base method

func (*MockEncoder) Len

func (m *MockEncoder) Len() int

Len mocks base method

func (*MockEncoder) NumEncoded added in v0.4.4

func (m *MockEncoder) NumEncoded() int

NumEncoded mocks base method

func (*MockEncoder) Reset

func (m *MockEncoder) Reset(t time.Time, capacity int)

Reset mocks base method

func (*MockEncoder) Stream

func (m *MockEncoder) Stream() xio.SegmentReader

Stream mocks base method

type MockEncoderMockRecorder

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

MockEncoderMockRecorder is the mock recorder for MockEncoder

func (*MockEncoderMockRecorder) Close

func (mr *MockEncoderMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockEncoderMockRecorder) Discard

func (mr *MockEncoderMockRecorder) Discard() *gomock.Call

Discard indicates an expected call of Discard

func (*MockEncoderMockRecorder) DiscardReset

func (mr *MockEncoderMockRecorder) DiscardReset(t, capacity interface{}) *gomock.Call

DiscardReset indicates an expected call of DiscardReset

func (*MockEncoderMockRecorder) Encode

func (mr *MockEncoderMockRecorder) Encode(dp, unit, annotation interface{}) *gomock.Call

Encode indicates an expected call of Encode

func (*MockEncoderMockRecorder) LastEncoded added in v0.4.4

func (mr *MockEncoderMockRecorder) LastEncoded() *gomock.Call

LastEncoded indicates an expected call of LastEncoded

func (*MockEncoderMockRecorder) Len

func (mr *MockEncoderMockRecorder) Len() *gomock.Call

Len indicates an expected call of Len

func (*MockEncoderMockRecorder) NumEncoded added in v0.4.4

func (mr *MockEncoderMockRecorder) NumEncoded() *gomock.Call

NumEncoded indicates an expected call of NumEncoded

func (*MockEncoderMockRecorder) Reset

func (mr *MockEncoderMockRecorder) Reset(t, capacity interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockEncoderMockRecorder) Stream

func (mr *MockEncoderMockRecorder) Stream() *gomock.Call

Stream indicates an expected call of Stream

type MockEncoderPool

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

MockEncoderPool is a mock of EncoderPool interface

func NewMockEncoderPool

func NewMockEncoderPool(ctrl *gomock.Controller) *MockEncoderPool

NewMockEncoderPool creates a new mock instance

func (*MockEncoderPool) EXPECT

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

func (*MockEncoderPool) Get

func (m *MockEncoderPool) Get() Encoder

Get mocks base method

func (*MockEncoderPool) Init

func (m *MockEncoderPool) Init(alloc EncoderAllocate)

Init mocks base method

func (*MockEncoderPool) Put

func (m *MockEncoderPool) Put(e Encoder)

Put mocks base method

type MockEncoderPoolMockRecorder

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

MockEncoderPoolMockRecorder is the mock recorder for MockEncoderPool

func (*MockEncoderPoolMockRecorder) Get

Get indicates an expected call of Get

func (*MockEncoderPoolMockRecorder) Init

func (mr *MockEncoderPoolMockRecorder) Init(alloc interface{}) *gomock.Call

Init indicates an expected call of Init

func (*MockEncoderPoolMockRecorder) Put

func (mr *MockEncoderPoolMockRecorder) Put(e interface{}) *gomock.Call

Put indicates an expected call of Put

type MockIStream

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

MockIStream is a mock of IStream interface

func NewMockIStream

func NewMockIStream(ctrl *gomock.Controller) *MockIStream

NewMockIStream creates a new mock instance

func (*MockIStream) EXPECT

func (m *MockIStream) EXPECT() *MockIStreamMockRecorder

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

func (*MockIStream) PeekBits

func (m *MockIStream) PeekBits(numBits int) (uint64, error)

PeekBits mocks base method

func (*MockIStream) ReadBit

func (m *MockIStream) ReadBit() (Bit, error)

ReadBit mocks base method

func (*MockIStream) ReadBits

func (m *MockIStream) ReadBits(numBits int) (uint64, error)

ReadBits mocks base method

func (*MockIStream) ReadByte

func (m *MockIStream) ReadByte() (byte, error)

ReadByte mocks base method

func (*MockIStream) Reset

func (m *MockIStream) Reset(r io.Reader)

Reset mocks base method

type MockIStreamMockRecorder

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

MockIStreamMockRecorder is the mock recorder for MockIStream

func (*MockIStreamMockRecorder) PeekBits

func (mr *MockIStreamMockRecorder) PeekBits(numBits interface{}) *gomock.Call

PeekBits indicates an expected call of PeekBits

func (*MockIStreamMockRecorder) ReadBit

func (mr *MockIStreamMockRecorder) ReadBit() *gomock.Call

ReadBit indicates an expected call of ReadBit

func (*MockIStreamMockRecorder) ReadBits

func (mr *MockIStreamMockRecorder) ReadBits(numBits interface{}) *gomock.Call

ReadBits indicates an expected call of ReadBits

func (*MockIStreamMockRecorder) ReadByte

func (mr *MockIStreamMockRecorder) ReadByte() *gomock.Call

ReadByte indicates an expected call of ReadByte

func (*MockIStreamMockRecorder) Reset

func (mr *MockIStreamMockRecorder) Reset(r interface{}) *gomock.Call

Reset indicates an expected call of Reset

type MockIterator

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

MockIterator is a mock of Iterator interface

func NewMockIterator

func NewMockIterator(ctrl *gomock.Controller) *MockIterator

NewMockIterator creates a new mock instance

func (*MockIterator) Close

func (m *MockIterator) Close()

Close mocks base method

func (*MockIterator) Current

func (m *MockIterator) Current() (ts.Datapoint, time0.Unit, ts.Annotation)

Current mocks base method

func (*MockIterator) EXPECT

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

func (*MockIterator) Err

func (m *MockIterator) Err() error

Err mocks base method

func (*MockIterator) Next

func (m *MockIterator) Next() bool

Next mocks base method

type MockIteratorMockRecorder

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

MockIteratorMockRecorder is the mock recorder for MockIterator

func (*MockIteratorMockRecorder) Close

func (mr *MockIteratorMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockIteratorMockRecorder) Current

func (mr *MockIteratorMockRecorder) Current() *gomock.Call

Current indicates an expected call of Current

func (*MockIteratorMockRecorder) Err

Err indicates an expected call of Err

func (*MockIteratorMockRecorder) Next

func (mr *MockIteratorMockRecorder) Next() *gomock.Call

Next indicates an expected call of Next

type MockIteratorPools

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

MockIteratorPools is a mock of IteratorPools interface

func NewMockIteratorPools

func NewMockIteratorPools(ctrl *gomock.Controller) *MockIteratorPools

NewMockIteratorPools creates a new mock instance

func (*MockIteratorPools) CheckedBytesWrapper

func (m *MockIteratorPools) CheckedBytesWrapper() xpool.CheckedBytesWrapperPool

CheckedBytesWrapper mocks base method

func (*MockIteratorPools) EXPECT

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

func (*MockIteratorPools) ID

func (m *MockIteratorPools) ID() ident.Pool

ID mocks base method

func (*MockIteratorPools) MultiReaderIterator

func (m *MockIteratorPools) MultiReaderIterator() MultiReaderIteratorPool

MultiReaderIterator mocks base method

func (*MockIteratorPools) MultiReaderIteratorArray

func (m *MockIteratorPools) MultiReaderIteratorArray() MultiReaderIteratorArrayPool

MultiReaderIteratorArray mocks base method

func (*MockIteratorPools) MutableSeriesIterators added in v0.3.0

func (m *MockIteratorPools) MutableSeriesIterators() MutableSeriesIteratorsPool

MutableSeriesIterators mocks base method

func (*MockIteratorPools) SeriesIterator

func (m *MockIteratorPools) SeriesIterator() SeriesIteratorPool

SeriesIterator mocks base method

func (*MockIteratorPools) TagDecoder added in v0.3.0

func (m *MockIteratorPools) TagDecoder() serialize.TagDecoderPool

TagDecoder mocks base method

func (*MockIteratorPools) TagEncoder added in v0.3.0

func (m *MockIteratorPools) TagEncoder() serialize.TagEncoderPool

TagEncoder mocks base method

type MockIteratorPoolsMockRecorder

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

MockIteratorPoolsMockRecorder is the mock recorder for MockIteratorPools

func (*MockIteratorPoolsMockRecorder) CheckedBytesWrapper

func (mr *MockIteratorPoolsMockRecorder) CheckedBytesWrapper() *gomock.Call

CheckedBytesWrapper indicates an expected call of CheckedBytesWrapper

func (*MockIteratorPoolsMockRecorder) ID

ID indicates an expected call of ID

func (*MockIteratorPoolsMockRecorder) MultiReaderIterator

func (mr *MockIteratorPoolsMockRecorder) MultiReaderIterator() *gomock.Call

MultiReaderIterator indicates an expected call of MultiReaderIterator

func (*MockIteratorPoolsMockRecorder) MultiReaderIteratorArray

func (mr *MockIteratorPoolsMockRecorder) MultiReaderIteratorArray() *gomock.Call

MultiReaderIteratorArray indicates an expected call of MultiReaderIteratorArray

func (*MockIteratorPoolsMockRecorder) MutableSeriesIterators added in v0.3.0

func (mr *MockIteratorPoolsMockRecorder) MutableSeriesIterators() *gomock.Call

MutableSeriesIterators indicates an expected call of MutableSeriesIterators

func (*MockIteratorPoolsMockRecorder) SeriesIterator

func (mr *MockIteratorPoolsMockRecorder) SeriesIterator() *gomock.Call

SeriesIterator indicates an expected call of SeriesIterator

func (*MockIteratorPoolsMockRecorder) TagDecoder added in v0.3.0

func (mr *MockIteratorPoolsMockRecorder) TagDecoder() *gomock.Call

TagDecoder indicates an expected call of TagDecoder

func (*MockIteratorPoolsMockRecorder) TagEncoder added in v0.3.0

func (mr *MockIteratorPoolsMockRecorder) TagEncoder() *gomock.Call

TagEncoder indicates an expected call of TagEncoder

type MockMultiReaderIterator

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

MockMultiReaderIterator is a mock of MultiReaderIterator interface

func NewMockMultiReaderIterator

func NewMockMultiReaderIterator(ctrl *gomock.Controller) *MockMultiReaderIterator

NewMockMultiReaderIterator creates a new mock instance

func (*MockMultiReaderIterator) Close

func (m *MockMultiReaderIterator) Close()

Close mocks base method

func (*MockMultiReaderIterator) Current

Current mocks base method

func (*MockMultiReaderIterator) EXPECT

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

func (*MockMultiReaderIterator) Err

func (m *MockMultiReaderIterator) Err() error

Err mocks base method

func (*MockMultiReaderIterator) Next

func (m *MockMultiReaderIterator) Next() bool

Next mocks base method

func (*MockMultiReaderIterator) Readers

Readers mocks base method

func (*MockMultiReaderIterator) Reset

func (m *MockMultiReaderIterator) Reset(readers []xio.SegmentReader, start time.Time, blockSize time.Duration)

Reset mocks base method

func (*MockMultiReaderIterator) ResetSliceOfSlices

func (m *MockMultiReaderIterator) ResetSliceOfSlices(readers xio.ReaderSliceOfSlicesIterator)

ResetSliceOfSlices mocks base method

type MockMultiReaderIteratorArrayPool

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

MockMultiReaderIteratorArrayPool is a mock of MultiReaderIteratorArrayPool interface

func NewMockMultiReaderIteratorArrayPool

func NewMockMultiReaderIteratorArrayPool(ctrl *gomock.Controller) *MockMultiReaderIteratorArrayPool

NewMockMultiReaderIteratorArrayPool creates a new mock instance

func (*MockMultiReaderIteratorArrayPool) EXPECT

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

func (*MockMultiReaderIteratorArrayPool) Get

Get mocks base method

func (*MockMultiReaderIteratorArrayPool) Init

Init mocks base method

func (*MockMultiReaderIteratorArrayPool) Put

Put mocks base method

type MockMultiReaderIteratorArrayPoolMockRecorder

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

MockMultiReaderIteratorArrayPoolMockRecorder is the mock recorder for MockMultiReaderIteratorArrayPool

func (*MockMultiReaderIteratorArrayPoolMockRecorder) Get

func (mr *MockMultiReaderIteratorArrayPoolMockRecorder) Get(size interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockMultiReaderIteratorArrayPoolMockRecorder) Init

Init indicates an expected call of Init

func (*MockMultiReaderIteratorArrayPoolMockRecorder) Put

func (mr *MockMultiReaderIteratorArrayPoolMockRecorder) Put(iters interface{}) *gomock.Call

Put indicates an expected call of Put

type MockMultiReaderIteratorMockRecorder

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

MockMultiReaderIteratorMockRecorder is the mock recorder for MockMultiReaderIterator

func (*MockMultiReaderIteratorMockRecorder) Close

Close indicates an expected call of Close

func (*MockMultiReaderIteratorMockRecorder) Current

Current indicates an expected call of Current

func (*MockMultiReaderIteratorMockRecorder) Err

Err indicates an expected call of Err

func (*MockMultiReaderIteratorMockRecorder) Next

Next indicates an expected call of Next

func (*MockMultiReaderIteratorMockRecorder) Readers

Readers indicates an expected call of Readers

func (*MockMultiReaderIteratorMockRecorder) Reset

func (mr *MockMultiReaderIteratorMockRecorder) Reset(readers, start, blockSize interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockMultiReaderIteratorMockRecorder) ResetSliceOfSlices

func (mr *MockMultiReaderIteratorMockRecorder) ResetSliceOfSlices(readers interface{}) *gomock.Call

ResetSliceOfSlices indicates an expected call of ResetSliceOfSlices

type MockMultiReaderIteratorPool

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

MockMultiReaderIteratorPool is a mock of MultiReaderIteratorPool interface

func NewMockMultiReaderIteratorPool

func NewMockMultiReaderIteratorPool(ctrl *gomock.Controller) *MockMultiReaderIteratorPool

NewMockMultiReaderIteratorPool creates a new mock instance

func (*MockMultiReaderIteratorPool) EXPECT

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

func (*MockMultiReaderIteratorPool) Get

Get mocks base method

func (*MockMultiReaderIteratorPool) Init

Init mocks base method

func (*MockMultiReaderIteratorPool) Put

Put mocks base method

type MockMultiReaderIteratorPoolMockRecorder

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

MockMultiReaderIteratorPoolMockRecorder is the mock recorder for MockMultiReaderIteratorPool

func (*MockMultiReaderIteratorPoolMockRecorder) Get

Get indicates an expected call of Get

func (*MockMultiReaderIteratorPoolMockRecorder) Init

func (mr *MockMultiReaderIteratorPoolMockRecorder) Init(alloc interface{}) *gomock.Call

Init indicates an expected call of Init

func (*MockMultiReaderIteratorPoolMockRecorder) Put

func (mr *MockMultiReaderIteratorPoolMockRecorder) Put(iter interface{}) *gomock.Call

Put indicates an expected call of Put

type MockMutableSeriesIterators

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

MockMutableSeriesIterators is a mock of MutableSeriesIterators interface

func NewMockMutableSeriesIterators

func NewMockMutableSeriesIterators(ctrl *gomock.Controller) *MockMutableSeriesIterators

NewMockMutableSeriesIterators creates a new mock instance

func (*MockMutableSeriesIterators) Cap

Cap mocks base method

func (*MockMutableSeriesIterators) Close

func (m *MockMutableSeriesIterators) Close()

Close mocks base method

func (*MockMutableSeriesIterators) EXPECT

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

func (*MockMutableSeriesIterators) Iters

Iters mocks base method

func (*MockMutableSeriesIterators) Len

Len mocks base method

func (*MockMutableSeriesIterators) Reset

func (m *MockMutableSeriesIterators) Reset(size int)

Reset mocks base method

func (*MockMutableSeriesIterators) SetAt

func (m *MockMutableSeriesIterators) SetAt(idx int, iter SeriesIterator)

SetAt mocks base method

type MockMutableSeriesIteratorsMockRecorder

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

MockMutableSeriesIteratorsMockRecorder is the mock recorder for MockMutableSeriesIterators

func (*MockMutableSeriesIteratorsMockRecorder) Cap

Cap indicates an expected call of Cap

func (*MockMutableSeriesIteratorsMockRecorder) Close

Close indicates an expected call of Close

func (*MockMutableSeriesIteratorsMockRecorder) Iters

Iters indicates an expected call of Iters

func (*MockMutableSeriesIteratorsMockRecorder) Len

Len indicates an expected call of Len

func (*MockMutableSeriesIteratorsMockRecorder) Reset

func (mr *MockMutableSeriesIteratorsMockRecorder) Reset(size interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockMutableSeriesIteratorsMockRecorder) SetAt

func (mr *MockMutableSeriesIteratorsMockRecorder) SetAt(idx, iter interface{}) *gomock.Call

SetAt indicates an expected call of SetAt

type MockMutableSeriesIteratorsPool

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

MockMutableSeriesIteratorsPool is a mock of MutableSeriesIteratorsPool interface

func NewMockMutableSeriesIteratorsPool

func NewMockMutableSeriesIteratorsPool(ctrl *gomock.Controller) *MockMutableSeriesIteratorsPool

NewMockMutableSeriesIteratorsPool creates a new mock instance

func (*MockMutableSeriesIteratorsPool) EXPECT

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

func (*MockMutableSeriesIteratorsPool) Get

Get mocks base method

func (*MockMutableSeriesIteratorsPool) Init

Init mocks base method

func (*MockMutableSeriesIteratorsPool) Put

Put mocks base method

type MockMutableSeriesIteratorsPoolMockRecorder

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

MockMutableSeriesIteratorsPoolMockRecorder is the mock recorder for MockMutableSeriesIteratorsPool

func (*MockMutableSeriesIteratorsPoolMockRecorder) Get

func (mr *MockMutableSeriesIteratorsPoolMockRecorder) Get(size interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockMutableSeriesIteratorsPoolMockRecorder) Init

Init indicates an expected call of Init

func (*MockMutableSeriesIteratorsPoolMockRecorder) Put

func (mr *MockMutableSeriesIteratorsPoolMockRecorder) Put(iters interface{}) *gomock.Call

Put indicates an expected call of Put

type MockOStream

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

MockOStream is a mock of OStream interface

func NewMockOStream

func NewMockOStream(ctrl *gomock.Controller) *MockOStream

NewMockOStream creates a new mock instance

func (*MockOStream) Discard

func (m *MockOStream) Discard() checked.Bytes

Discard mocks base method

func (*MockOStream) EXPECT

func (m *MockOStream) EXPECT() *MockOStreamMockRecorder

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

func (*MockOStream) Empty

func (m *MockOStream) Empty() bool

Empty mocks base method

func (*MockOStream) Len

func (m *MockOStream) Len() int

Len mocks base method

func (*MockOStream) Rawbytes

func (m *MockOStream) Rawbytes() ([]byte, int)

Rawbytes mocks base method

func (*MockOStream) Reset

func (m *MockOStream) Reset(buffer checked.Bytes)

Reset mocks base method

func (*MockOStream) WriteBit

func (m *MockOStream) WriteBit(v Bit)

WriteBit mocks base method

func (*MockOStream) WriteBits

func (m *MockOStream) WriteBits(v uint64, numBits int)

WriteBits mocks base method

func (*MockOStream) WriteByte

func (m *MockOStream) WriteByte(v byte)

WriteByte mocks base method

func (*MockOStream) WriteBytes

func (m *MockOStream) WriteBytes(bytes []byte)

WriteBytes mocks base method

type MockOStreamMockRecorder

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

MockOStreamMockRecorder is the mock recorder for MockOStream

func (*MockOStreamMockRecorder) Discard

func (mr *MockOStreamMockRecorder) Discard() *gomock.Call

Discard indicates an expected call of Discard

func (*MockOStreamMockRecorder) Empty

func (mr *MockOStreamMockRecorder) Empty() *gomock.Call

Empty indicates an expected call of Empty

func (*MockOStreamMockRecorder) Len

func (mr *MockOStreamMockRecorder) Len() *gomock.Call

Len indicates an expected call of Len

func (*MockOStreamMockRecorder) Rawbytes

func (mr *MockOStreamMockRecorder) Rawbytes() *gomock.Call

Rawbytes indicates an expected call of Rawbytes

func (*MockOStreamMockRecorder) Reset

func (mr *MockOStreamMockRecorder) Reset(buffer interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockOStreamMockRecorder) WriteBit

func (mr *MockOStreamMockRecorder) WriteBit(v interface{}) *gomock.Call

WriteBit indicates an expected call of WriteBit

func (*MockOStreamMockRecorder) WriteBits

func (mr *MockOStreamMockRecorder) WriteBits(v, numBits interface{}) *gomock.Call

WriteBits indicates an expected call of WriteBits

func (*MockOStreamMockRecorder) WriteByte

func (mr *MockOStreamMockRecorder) WriteByte(v interface{}) *gomock.Call

WriteByte indicates an expected call of WriteByte

func (*MockOStreamMockRecorder) WriteBytes

func (mr *MockOStreamMockRecorder) WriteBytes(bytes interface{}) *gomock.Call

WriteBytes indicates an expected call of WriteBytes

type MockOptions

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

MockOptions is a mock of Options interface

func NewMockOptions

func NewMockOptions(ctrl *gomock.Controller) *MockOptions

NewMockOptions creates a new mock instance

func (*MockOptions) BytesPool

func (m *MockOptions) BytesPool() pool.CheckedBytesPool

BytesPool mocks base method

func (*MockOptions) DefaultTimeUnit

func (m *MockOptions) DefaultTimeUnit() time0.Unit

DefaultTimeUnit mocks base method

func (*MockOptions) EXPECT

func (m *MockOptions) EXPECT() *MockOptionsMockRecorder

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

func (*MockOptions) EncoderPool

func (m *MockOptions) EncoderPool() EncoderPool

EncoderPool mocks base method

func (*MockOptions) MarkerEncodingScheme

func (m *MockOptions) MarkerEncodingScheme() MarkerEncodingScheme

MarkerEncodingScheme mocks base method

func (*MockOptions) ReaderIteratorPool

func (m *MockOptions) ReaderIteratorPool() ReaderIteratorPool

ReaderIteratorPool mocks base method

func (*MockOptions) SegmentReaderPool

func (m *MockOptions) SegmentReaderPool() xio.SegmentReaderPool

SegmentReaderPool mocks base method

func (*MockOptions) SetBytesPool

func (m *MockOptions) SetBytesPool(value pool.CheckedBytesPool) Options

SetBytesPool mocks base method

func (*MockOptions) SetDefaultTimeUnit

func (m *MockOptions) SetDefaultTimeUnit(tu time0.Unit) Options

SetDefaultTimeUnit mocks base method

func (*MockOptions) SetEncoderPool

func (m *MockOptions) SetEncoderPool(value EncoderPool) Options

SetEncoderPool mocks base method

func (*MockOptions) SetMarkerEncodingScheme

func (m *MockOptions) SetMarkerEncodingScheme(value MarkerEncodingScheme) Options

SetMarkerEncodingScheme mocks base method

func (*MockOptions) SetReaderIteratorPool

func (m *MockOptions) SetReaderIteratorPool(value ReaderIteratorPool) Options

SetReaderIteratorPool mocks base method

func (*MockOptions) SetSegmentReaderPool

func (m *MockOptions) SetSegmentReaderPool(value xio.SegmentReaderPool) Options

SetSegmentReaderPool mocks base method

func (*MockOptions) SetTimeEncodingSchemes

func (m *MockOptions) SetTimeEncodingSchemes(value TimeEncodingSchemes) Options

SetTimeEncodingSchemes mocks base method

func (*MockOptions) TimeEncodingSchemes

func (m *MockOptions) TimeEncodingSchemes() TimeEncodingSchemes

TimeEncodingSchemes mocks base method

type MockOptionsMockRecorder

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

MockOptionsMockRecorder is the mock recorder for MockOptions

func (*MockOptionsMockRecorder) BytesPool

func (mr *MockOptionsMockRecorder) BytesPool() *gomock.Call

BytesPool indicates an expected call of BytesPool

func (*MockOptionsMockRecorder) DefaultTimeUnit

func (mr *MockOptionsMockRecorder) DefaultTimeUnit() *gomock.Call

DefaultTimeUnit indicates an expected call of DefaultTimeUnit

func (*MockOptionsMockRecorder) EncoderPool

func (mr *MockOptionsMockRecorder) EncoderPool() *gomock.Call

EncoderPool indicates an expected call of EncoderPool

func (*MockOptionsMockRecorder) MarkerEncodingScheme

func (mr *MockOptionsMockRecorder) MarkerEncodingScheme() *gomock.Call

MarkerEncodingScheme indicates an expected call of MarkerEncodingScheme

func (*MockOptionsMockRecorder) ReaderIteratorPool

func (mr *MockOptionsMockRecorder) ReaderIteratorPool() *gomock.Call

ReaderIteratorPool indicates an expected call of ReaderIteratorPool

func (*MockOptionsMockRecorder) SegmentReaderPool

func (mr *MockOptionsMockRecorder) SegmentReaderPool() *gomock.Call

SegmentReaderPool indicates an expected call of SegmentReaderPool

func (*MockOptionsMockRecorder) SetBytesPool

func (mr *MockOptionsMockRecorder) SetBytesPool(value interface{}) *gomock.Call

SetBytesPool indicates an expected call of SetBytesPool

func (*MockOptionsMockRecorder) SetDefaultTimeUnit

func (mr *MockOptionsMockRecorder) SetDefaultTimeUnit(tu interface{}) *gomock.Call

SetDefaultTimeUnit indicates an expected call of SetDefaultTimeUnit

func (*MockOptionsMockRecorder) SetEncoderPool

func (mr *MockOptionsMockRecorder) SetEncoderPool(value interface{}) *gomock.Call

SetEncoderPool indicates an expected call of SetEncoderPool

func (*MockOptionsMockRecorder) SetMarkerEncodingScheme

func (mr *MockOptionsMockRecorder) SetMarkerEncodingScheme(value interface{}) *gomock.Call

SetMarkerEncodingScheme indicates an expected call of SetMarkerEncodingScheme

func (*MockOptionsMockRecorder) SetReaderIteratorPool

func (mr *MockOptionsMockRecorder) SetReaderIteratorPool(value interface{}) *gomock.Call

SetReaderIteratorPool indicates an expected call of SetReaderIteratorPool

func (*MockOptionsMockRecorder) SetSegmentReaderPool

func (mr *MockOptionsMockRecorder) SetSegmentReaderPool(value interface{}) *gomock.Call

SetSegmentReaderPool indicates an expected call of SetSegmentReaderPool

func (*MockOptionsMockRecorder) SetTimeEncodingSchemes

func (mr *MockOptionsMockRecorder) SetTimeEncodingSchemes(value interface{}) *gomock.Call

SetTimeEncodingSchemes indicates an expected call of SetTimeEncodingSchemes

func (*MockOptionsMockRecorder) TimeEncodingSchemes

func (mr *MockOptionsMockRecorder) TimeEncodingSchemes() *gomock.Call

TimeEncodingSchemes indicates an expected call of TimeEncodingSchemes

type MockReaderIterator

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

MockReaderIterator is a mock of ReaderIterator interface

func NewMockReaderIterator

func NewMockReaderIterator(ctrl *gomock.Controller) *MockReaderIterator

NewMockReaderIterator creates a new mock instance

func (*MockReaderIterator) Close

func (m *MockReaderIterator) Close()

Close mocks base method

func (*MockReaderIterator) Current

Current mocks base method

func (*MockReaderIterator) EXPECT

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

func (*MockReaderIterator) Err

func (m *MockReaderIterator) Err() error

Err mocks base method

func (*MockReaderIterator) Next

func (m *MockReaderIterator) Next() bool

Next mocks base method

func (*MockReaderIterator) Reset

func (m *MockReaderIterator) Reset(reader io.Reader)

Reset mocks base method

type MockReaderIteratorMockRecorder

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

MockReaderIteratorMockRecorder is the mock recorder for MockReaderIterator

func (*MockReaderIteratorMockRecorder) Close

Close indicates an expected call of Close

func (*MockReaderIteratorMockRecorder) Current

Current indicates an expected call of Current

func (*MockReaderIteratorMockRecorder) Err

Err indicates an expected call of Err

func (*MockReaderIteratorMockRecorder) Next

Next indicates an expected call of Next

func (*MockReaderIteratorMockRecorder) Reset

func (mr *MockReaderIteratorMockRecorder) Reset(reader interface{}) *gomock.Call

Reset indicates an expected call of Reset

type MockReaderIteratorPool

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

MockReaderIteratorPool is a mock of ReaderIteratorPool interface

func NewMockReaderIteratorPool

func NewMockReaderIteratorPool(ctrl *gomock.Controller) *MockReaderIteratorPool

NewMockReaderIteratorPool creates a new mock instance

func (*MockReaderIteratorPool) EXPECT

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

func (*MockReaderIteratorPool) Get

Get mocks base method

func (*MockReaderIteratorPool) Init

Init mocks base method

func (*MockReaderIteratorPool) Put

Put mocks base method

type MockReaderIteratorPoolMockRecorder

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

MockReaderIteratorPoolMockRecorder is the mock recorder for MockReaderIteratorPool

func (*MockReaderIteratorPoolMockRecorder) Get

Get indicates an expected call of Get

func (*MockReaderIteratorPoolMockRecorder) Init

func (mr *MockReaderIteratorPoolMockRecorder) Init(alloc interface{}) *gomock.Call

Init indicates an expected call of Init

func (*MockReaderIteratorPoolMockRecorder) Put

func (mr *MockReaderIteratorPoolMockRecorder) Put(iter interface{}) *gomock.Call

Put indicates an expected call of Put

type MockSeriesIterator

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

MockSeriesIterator is a mock of SeriesIterator interface

func NewMockSeriesIterator

func NewMockSeriesIterator(ctrl *gomock.Controller) *MockSeriesIterator

NewMockSeriesIterator creates a new mock instance

func (*MockSeriesIterator) Close

func (m *MockSeriesIterator) Close()

Close mocks base method

func (*MockSeriesIterator) Current

Current mocks base method

func (*MockSeriesIterator) EXPECT

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

func (*MockSeriesIterator) End

func (m *MockSeriesIterator) End() time.Time

End mocks base method

func (*MockSeriesIterator) Err

func (m *MockSeriesIterator) Err() error

Err mocks base method

func (*MockSeriesIterator) ID

func (m *MockSeriesIterator) ID() ident.ID

ID mocks base method

func (*MockSeriesIterator) Namespace

func (m *MockSeriesIterator) Namespace() ident.ID

Namespace mocks base method

func (*MockSeriesIterator) Next

func (m *MockSeriesIterator) Next() bool

Next mocks base method

func (*MockSeriesIterator) Replicas

func (m *MockSeriesIterator) Replicas() []MultiReaderIterator

Replicas mocks base method

func (*MockSeriesIterator) Reset

Reset mocks base method

func (*MockSeriesIterator) SetIterateEqualTimestampStrategy added in v0.4.4

func (m *MockSeriesIterator) SetIterateEqualTimestampStrategy(strategy IterateEqualTimestampStrategy)

SetIterateEqualTimestampStrategy mocks base method

func (*MockSeriesIterator) Start

func (m *MockSeriesIterator) Start() time.Time

Start mocks base method

func (*MockSeriesIterator) Tags

Tags mocks base method

type MockSeriesIteratorMockRecorder

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

MockSeriesIteratorMockRecorder is the mock recorder for MockSeriesIterator

func (*MockSeriesIteratorMockRecorder) Close

Close indicates an expected call of Close

func (*MockSeriesIteratorMockRecorder) Current

Current indicates an expected call of Current

func (*MockSeriesIteratorMockRecorder) End

End indicates an expected call of End

func (*MockSeriesIteratorMockRecorder) Err

Err indicates an expected call of Err

func (*MockSeriesIteratorMockRecorder) ID

ID indicates an expected call of ID

func (*MockSeriesIteratorMockRecorder) Namespace

func (mr *MockSeriesIteratorMockRecorder) Namespace() *gomock.Call

Namespace indicates an expected call of Namespace

func (*MockSeriesIteratorMockRecorder) Next

Next indicates an expected call of Next

func (*MockSeriesIteratorMockRecorder) Replicas

func (mr *MockSeriesIteratorMockRecorder) Replicas() *gomock.Call

Replicas indicates an expected call of Replicas

func (*MockSeriesIteratorMockRecorder) Reset

func (mr *MockSeriesIteratorMockRecorder) Reset(opts interface{}) *gomock.Call

Reset indicates an expected call of Reset

func (*MockSeriesIteratorMockRecorder) SetIterateEqualTimestampStrategy added in v0.4.4

func (mr *MockSeriesIteratorMockRecorder) SetIterateEqualTimestampStrategy(strategy interface{}) *gomock.Call

SetIterateEqualTimestampStrategy indicates an expected call of SetIterateEqualTimestampStrategy

func (*MockSeriesIteratorMockRecorder) Start

Start indicates an expected call of Start

func (*MockSeriesIteratorMockRecorder) Tags

Tags indicates an expected call of Tags

type MockSeriesIteratorPool

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

MockSeriesIteratorPool is a mock of SeriesIteratorPool interface

func NewMockSeriesIteratorPool

func NewMockSeriesIteratorPool(ctrl *gomock.Controller) *MockSeriesIteratorPool

NewMockSeriesIteratorPool creates a new mock instance

func (*MockSeriesIteratorPool) EXPECT

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

func (*MockSeriesIteratorPool) Get

Get mocks base method

func (*MockSeriesIteratorPool) Init

func (m *MockSeriesIteratorPool) Init()

Init mocks base method

func (*MockSeriesIteratorPool) Put

Put mocks base method

type MockSeriesIteratorPoolMockRecorder

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

MockSeriesIteratorPoolMockRecorder is the mock recorder for MockSeriesIteratorPool

func (*MockSeriesIteratorPoolMockRecorder) Get

Get indicates an expected call of Get

func (*MockSeriesIteratorPoolMockRecorder) Init

Init indicates an expected call of Init

func (*MockSeriesIteratorPoolMockRecorder) Put

func (mr *MockSeriesIteratorPoolMockRecorder) Put(iter interface{}) *gomock.Call

Put indicates an expected call of Put

type MockSeriesIterators

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

MockSeriesIterators is a mock of SeriesIterators interface

func NewMockSeriesIterators

func NewMockSeriesIterators(ctrl *gomock.Controller) *MockSeriesIterators

NewMockSeriesIterators creates a new mock instance

func (*MockSeriesIterators) Close

func (m *MockSeriesIterators) Close()

Close mocks base method

func (*MockSeriesIterators) EXPECT

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

func (*MockSeriesIterators) Iters

func (m *MockSeriesIterators) Iters() []SeriesIterator

Iters mocks base method

func (*MockSeriesIterators) Len

func (m *MockSeriesIterators) Len() int

Len mocks base method

type MockSeriesIteratorsMockRecorder

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

MockSeriesIteratorsMockRecorder is the mock recorder for MockSeriesIterators

func (*MockSeriesIteratorsMockRecorder) Close

Close indicates an expected call of Close

func (*MockSeriesIteratorsMockRecorder) Iters

Iters indicates an expected call of Iters

func (*MockSeriesIteratorsMockRecorder) Len

Len indicates an expected call of Len

type MultiReaderIterator

type MultiReaderIterator interface {
	Iterator

	// Reset resets the iterator to read from a slice of readers.
	Reset(readers []xio.SegmentReader, start time.Time, blockSize time.Duration)

	// Reset resets the iterator to read from a slice of slice readers.
	ResetSliceOfSlices(readers xio.ReaderSliceOfSlicesIterator)

	// Readers exposes the underlying ReaderSliceOfSlicesIterator for this MultiReaderIterator
	Readers() xio.ReaderSliceOfSlicesIterator
}

MultiReaderIterator is an iterator that iterates in order over a list of sets of internally ordered but not collectively in order readers, it also deduplicates datapoints.

func NewMultiReaderIterator

func NewMultiReaderIterator(
	iteratorAlloc ReaderIteratorAllocate,
	pool MultiReaderIteratorPool,
) MultiReaderIterator

NewMultiReaderIterator creates a new multi-reader iterator.

type MultiReaderIteratorArrayPool

type MultiReaderIteratorArrayPool interface {
	// Init initializes the pool
	Init()

	// Get provides a Iterator array from the pool
	Get(size int) []MultiReaderIterator

	// Put returns a Iterator array to the pool
	Put(iters []MultiReaderIterator)
}

MultiReaderIteratorArrayPool provides a pool for MultiReaderIterator arrays

func NewMultiReaderIteratorArrayPool

func NewMultiReaderIteratorArrayPool(sizes []pool.Bucket) MultiReaderIteratorArrayPool

NewMultiReaderIteratorArrayPool creates a new pool

type MultiReaderIteratorPool

type MultiReaderIteratorPool interface {
	// Init initializes the pool.
	Init(alloc ReaderIteratorAllocate)

	// Get provides a MultiReaderIterator from the pool
	Get() MultiReaderIterator

	// Put returns a MultiReaderIterator to the pool
	Put(iter MultiReaderIterator)
}

MultiReaderIteratorPool provides a pool for MultiReaderIterators

func NewMultiReaderIteratorPool

func NewMultiReaderIteratorPool(opts pool.ObjectPoolOptions) MultiReaderIteratorPool

NewMultiReaderIteratorPool creates a new pool for MultiReaderIterators.

type MutableSeriesIterators

type MutableSeriesIterators interface {
	SeriesIterators

	// Reset the iters collection to a size for reuse
	Reset(size int)

	// Cap returns the capacity of the iters
	Cap() int

	// SetAt an index a SeriesIterator
	SetAt(idx int, iter SeriesIterator)
}

MutableSeriesIterators is a mutable SeriesIterators

func NewSeriesIterators

func NewSeriesIterators(
	iters []SeriesIterator,
	pool MutableSeriesIteratorsPool,
) MutableSeriesIterators

NewSeriesIterators creates a new series iterators collection

type MutableSeriesIteratorsPool

type MutableSeriesIteratorsPool interface {
	// Init initializes the pool
	Init()

	// Get provides a MutableSeriesIterators from the pool
	Get(size int) MutableSeriesIterators

	// Put returns a MutableSeriesIterators to the pool
	Put(iters MutableSeriesIterators)
}

MutableSeriesIteratorsPool provides a pool for MutableSeriesIterators

func NewMutableSeriesIteratorsPool

func NewMutableSeriesIteratorsPool(sizes []pool.Bucket) MutableSeriesIteratorsPool

NewMutableSeriesIteratorsPool creates a new pool

type NewDecoderFn

type NewDecoderFn func() Decoder

NewDecoderFn creates a new decoder

type NewEncoderFn

type NewEncoderFn func(start time.Time, bytes []byte) Encoder

NewEncoderFn creates a new encoder

type OStream

type OStream interface {
	Len() int
	Empty() bool
	WriteBit(v Bit)
	WriteBits(v uint64, numBits int)
	WriteByte(v byte)
	WriteBytes(bytes []byte)
	Reset(buffer checked.Bytes)
	Discard() checked.Bytes
	Rawbytes() ([]byte, int)
}

OStream encapsulates a writable stream.

func NewOStream

func NewOStream(
	bytes checked.Bytes,
	initAllocIfEmpty bool,
	bytesPool pool.CheckedBytesPool,
) OStream

NewOStream creates a new Ostream

type Options

type Options interface {
	// SetDefaultTimeUnit sets the default time unit for the encoder.
	SetDefaultTimeUnit(tu xtime.Unit) Options

	// DefaultTimeUnit returns the default time unit for the encoder.
	DefaultTimeUnit() xtime.Unit

	// SetTimeEncodingSchemes sets the time encoding schemes for different time units.
	SetTimeEncodingSchemes(value TimeEncodingSchemes) Options

	// TimeEncodingSchemes returns the time encoding schemes for different time units.
	TimeEncodingSchemes() TimeEncodingSchemes

	// SetMarkerEncodingScheme sets the marker encoding scheme.
	SetMarkerEncodingScheme(value MarkerEncodingScheme) Options

	// MarkerEncodingScheme returns the marker encoding scheme.
	MarkerEncodingScheme() MarkerEncodingScheme

	// SetEncoderPool sets the encoder pool.
	SetEncoderPool(value EncoderPool) Options

	// EncoderPool returns the encoder pool.
	EncoderPool() EncoderPool

	// SetReaderIteratorPool sets the ReaderIteratorPool.
	SetReaderIteratorPool(value ReaderIteratorPool) Options

	// ReaderIteratorPool returns the ReaderIteratorPool.
	ReaderIteratorPool() ReaderIteratorPool

	// SetBytesPool sets the bytes pool.
	SetBytesPool(value pool.CheckedBytesPool) Options

	// BytesPool returns the bytes pool.
	BytesPool() pool.CheckedBytesPool

	// SetSegmentReaderPool sets the segment reader pool.
	SetSegmentReaderPool(value xio.SegmentReaderPool) Options

	// SegmentReaderPool returns the segment reader pool.
	SegmentReaderPool() xio.SegmentReaderPool
}

Options represents different options for encoding time as well as markers.

func NewOptions

func NewOptions() Options

NewOptions creates a new options.

type ReaderIterator

type ReaderIterator interface {
	Iterator

	// Reset resets the iterator to read from a new reader.
	Reset(reader io.Reader)
}

ReaderIterator is the interface for a single-reader iterator.

func NewNullReaderIterator

func NewNullReaderIterator() ReaderIterator

NewNullReaderIterator returns a new reader iterator that performs no operations

type ReaderIteratorAllocate

type ReaderIteratorAllocate func(reader io.Reader) ReaderIterator

ReaderIteratorAllocate allocates a ReaderIterator for a pool.

type ReaderIteratorPool

type ReaderIteratorPool interface {
	// Init initializes the pool.
	Init(alloc ReaderIteratorAllocate)

	// Get provides a ReaderIterator from the pool
	Get() ReaderIterator

	// Put returns a ReaderIterator to the pool
	Put(iter ReaderIterator)
}

ReaderIteratorPool provides a pool for ReaderIterators

func NewReaderIteratorPool

func NewReaderIteratorPool(opts pool.ObjectPoolOptions) ReaderIteratorPool

NewReaderIteratorPool creates a new pool for ReaderIterators.

type SeriesIterator

type SeriesIterator interface {
	Iterator

	// ID gets the ID of the series
	ID() ident.ID

	// Namespace gets the namespace of the series
	Namespace() ident.ID

	// Tags returns an iterator over the tags associated with the ID.
	Tags() ident.TagIterator

	// Start returns the start time filter specified for the iterator
	Start() time.Time

	// End returns the end time filter specified for the iterator
	End() time.Time

	// Reset resets the iterator to read from a set of iterators from different replicas, one
	// must note that this can be an array with nil entries if some replicas did not return successfully.
	// NB: the SeriesIterator assumes ownership of the provided ids, this includes calling `id.Finalize()` upon
	// iter.Close().
	Reset(opts SeriesIteratorOptions)

	// SetIterateEqualTimestampStrategy sets the equal timestamp strategy of how
	// to select a value when the timestamp matches differing values with the same
	// timestamp from different replicas.
	// It can be set at any time and will apply to the current value returned
	// from the iterator immediately.
	SetIterateEqualTimestampStrategy(strategy IterateEqualTimestampStrategy)

	// Replicas exposes the underlying MultiReaderIterator slice for this SeriesIterator
	Replicas() []MultiReaderIterator
}

SeriesIterator is an iterator that iterates over a set of iterators from different replicas and de-dupes & merges results from the replicas for a given series while also applying a time filter on top of the values in case replicas returned values out of range on either end

func NewSeriesIterator

func NewSeriesIterator(
	opts SeriesIteratorOptions,
	pool SeriesIteratorPool,
) SeriesIterator

NewSeriesIterator creates a new series iterator. NB: The returned SeriesIterator assumes ownership of the provided `ident.ID`.

type SeriesIteratorOptions added in v0.4.4

type SeriesIteratorOptions struct {
	ID                            ident.ID
	Namespace                     ident.ID
	Tags                          ident.TagIterator
	Replicas                      []MultiReaderIterator
	StartInclusive                time.Time
	EndExclusive                  time.Time
	IterateEqualTimestampStrategy IterateEqualTimestampStrategy
}

SeriesIteratorOptions is a set of options for using a series iterator.

type SeriesIteratorPool

type SeriesIteratorPool interface {
	// Init initializes the pool
	Init()

	// Get provides a SeriesIterator from the pool
	Get() SeriesIterator

	// Put returns a SeriesIterator to the pool
	Put(iter SeriesIterator)
}

SeriesIteratorPool provides a pool for SeriesIterator

func NewSeriesIteratorPool

func NewSeriesIteratorPool(opts pool.ObjectPoolOptions) SeriesIteratorPool

NewSeriesIteratorPool creates a new pool for SeriesIterators.

type SeriesIterators

type SeriesIterators interface {
	// Iters returns the array of series iterators
	Iters() []SeriesIterator

	// Len returns the length of the iters
	Len() int

	// Close closes all iterators contained
	Close()
}

SeriesIterators is a collection of SeriesIterator that can close all iterators

var EmptySeriesIterators SeriesIterators = emptyIters{}

EmptySeriesIterators is an empty SeriesIterators.

type TimeBucket

type TimeBucket interface {

	// Opcode is the opcode prefix used to encode all time values in this range.
	Opcode() uint64

	// NumOpcodeBits is the number of bits used to write the opcode.
	NumOpcodeBits() int

	// Min is the minimum time value accepted in this range.
	Min() int64

	// Max is the maximum time value accepted in this range.
	Max() int64

	// NumValueBits is the number of bits used to write the time value.
	NumValueBits() int
}

TimeBucket represents a bucket for encoding time values.

type TimeEncodingScheme

type TimeEncodingScheme interface {

	// ZeroBucket is time bucket for encoding zero time values.
	ZeroBucket() TimeBucket

	// Buckets are the ordered time buckets used to encode non-zero, non-default time values.
	Buckets() []TimeBucket

	// DefaultBucket is the time bucket for catching all other time values not included in the regular buckets.
	DefaultBucket() TimeBucket
}

TimeEncodingScheme captures information related to time encoding.

type TimeEncodingSchemes

type TimeEncodingSchemes map[xtime.Unit]TimeEncodingScheme

TimeEncodingSchemes defines the time encoding schemes for different time units.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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