Documentation ¶
Overview ¶
Package xio is a generated GoMock package.
Index ¶
- Variables
- type BlockReader
- type MockSegmentReader
- func (m *MockSegmentReader) Clone() (SegmentReader, error)
- func (m *MockSegmentReader) EXPECT() *MockSegmentReaderMockRecorder
- func (m *MockSegmentReader) Finalize()
- func (m *MockSegmentReader) Read(arg0 []byte) (int, error)
- func (m *MockSegmentReader) Reset(arg0 ts.Segment)
- func (m *MockSegmentReader) Segment() (ts.Segment, error)
- type MockSegmentReaderMockRecorder
- func (mr *MockSegmentReaderMockRecorder) Clone() *gomock.Call
- func (mr *MockSegmentReaderMockRecorder) Finalize() *gomock.Call
- func (mr *MockSegmentReaderMockRecorder) Read(arg0 interface{}) *gomock.Call
- func (mr *MockSegmentReaderMockRecorder) Reset(arg0 interface{}) *gomock.Call
- func (mr *MockSegmentReaderMockRecorder) Segment() *gomock.Call
- type MockSegmentReaderPool
- type MockSegmentReaderPoolMockRecorder
- type ReaderSliceOfSlicesFromBlockReadersIterator
- type ReaderSliceOfSlicesIterator
- type SegmentReader
- type SegmentReaderPool
Constants ¶
This section is empty.
Variables ¶
var EmptyBlockReader = BlockReader{}
EmptyBlockReader represents the default block reader
Functions ¶
This section is empty.
Types ¶
type BlockReader ¶
type BlockReader struct { SegmentReader Start time.Time BlockSize time.Duration }
BlockReader represents a block reader backed by a SegmentReader with start time and block size
func (BlockReader) CloneBlock ¶
func (b BlockReader) CloneBlock() (BlockReader, error)
CloneBlock returns a clone of the block with the underlying data reset
func (BlockReader) IsEmpty ¶
func (b BlockReader) IsEmpty() bool
IsEmpty returns true for the empty block
func (BlockReader) IsNotEmpty ¶
func (b BlockReader) IsNotEmpty() bool
IsNotEmpty returns false for the empty block
func (*BlockReader) ResetWindowed ¶
ResetWindowed resets the underlying reader window, as well as start time and blockSize for the block
type MockSegmentReader ¶
type MockSegmentReader struct {
// contains filtered or unexported fields
}
MockSegmentReader is a mock of SegmentReader interface
func NewMockSegmentReader ¶
func NewMockSegmentReader(ctrl *gomock.Controller) *MockSegmentReader
NewMockSegmentReader creates a new mock instance
func (*MockSegmentReader) Clone ¶
func (m *MockSegmentReader) Clone() (SegmentReader, error)
Clone mocks base method
func (*MockSegmentReader) EXPECT ¶
func (m *MockSegmentReader) EXPECT() *MockSegmentReaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSegmentReader) Finalize ¶
func (m *MockSegmentReader) Finalize()
Finalize mocks base method
func (*MockSegmentReader) Read ¶
func (m *MockSegmentReader) Read(arg0 []byte) (int, error)
Read mocks base method
func (*MockSegmentReader) Reset ¶
func (m *MockSegmentReader) Reset(arg0 ts.Segment)
Reset mocks base method
type MockSegmentReaderMockRecorder ¶
type MockSegmentReaderMockRecorder struct {
// contains filtered or unexported fields
}
MockSegmentReaderMockRecorder is the mock recorder for MockSegmentReader
func (*MockSegmentReaderMockRecorder) Clone ¶
func (mr *MockSegmentReaderMockRecorder) Clone() *gomock.Call
Clone indicates an expected call of Clone
func (*MockSegmentReaderMockRecorder) Finalize ¶
func (mr *MockSegmentReaderMockRecorder) Finalize() *gomock.Call
Finalize indicates an expected call of Finalize
func (*MockSegmentReaderMockRecorder) Read ¶
func (mr *MockSegmentReaderMockRecorder) Read(arg0 interface{}) *gomock.Call
Read indicates an expected call of Read
func (*MockSegmentReaderMockRecorder) Reset ¶
func (mr *MockSegmentReaderMockRecorder) Reset(arg0 interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockSegmentReaderMockRecorder) Segment ¶
func (mr *MockSegmentReaderMockRecorder) Segment() *gomock.Call
Segment indicates an expected call of Segment
type MockSegmentReaderPool ¶
type MockSegmentReaderPool struct {
// contains filtered or unexported fields
}
MockSegmentReaderPool is a mock of SegmentReaderPool interface
func NewMockSegmentReaderPool ¶
func NewMockSegmentReaderPool(ctrl *gomock.Controller) *MockSegmentReaderPool
NewMockSegmentReaderPool creates a new mock instance
func (*MockSegmentReaderPool) EXPECT ¶
func (m *MockSegmentReaderPool) EXPECT() *MockSegmentReaderPoolMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSegmentReaderPool) Get ¶
func (m *MockSegmentReaderPool) Get() SegmentReader
Get mocks base method
func (*MockSegmentReaderPool) Put ¶
func (m *MockSegmentReaderPool) Put(arg0 SegmentReader)
Put mocks base method
type MockSegmentReaderPoolMockRecorder ¶
type MockSegmentReaderPoolMockRecorder struct {
// contains filtered or unexported fields
}
MockSegmentReaderPoolMockRecorder is the mock recorder for MockSegmentReaderPool
func (*MockSegmentReaderPoolMockRecorder) Get ¶
func (mr *MockSegmentReaderPoolMockRecorder) Get() *gomock.Call
Get indicates an expected call of Get
func (*MockSegmentReaderPoolMockRecorder) Init ¶
func (mr *MockSegmentReaderPoolMockRecorder) Init() *gomock.Call
Init indicates an expected call of Init
func (*MockSegmentReaderPoolMockRecorder) Put ¶
func (mr *MockSegmentReaderPoolMockRecorder) Put(arg0 interface{}) *gomock.Call
Put indicates an expected call of Put
type ReaderSliceOfSlicesFromBlockReadersIterator ¶
type ReaderSliceOfSlicesFromBlockReadersIterator interface { ReaderSliceOfSlicesIterator // Reset resets the iterator with a new array of block readers arrays Reset(blocks [][]BlockReader) }
ReaderSliceOfSlicesFromBlockReadersIterator is an iterator that iterates through an array of reader arrays
func NewReaderSliceOfSlicesFromBlockReadersIterator ¶
func NewReaderSliceOfSlicesFromBlockReadersIterator( blocks [][]BlockReader, ) ReaderSliceOfSlicesFromBlockReadersIterator
NewReaderSliceOfSlicesFromBlockReadersIterator creates a new reader slice of slices iterator
type ReaderSliceOfSlicesIterator ¶
type ReaderSliceOfSlicesIterator interface { // Next moves to the next item Next() bool // CurrentReaders returns the current length, start time, and block size CurrentReaders() (length int, start time.Time, blockSize time.Duration) // CurrentReaderAt returns the current reader in the slice of readers at an index CurrentReaderAt(idx int) BlockReader // Close closes the iterator Close() }
ReaderSliceOfSlicesIterator is an iterator that iterates through an array of reader arrays
type SegmentReader ¶
type SegmentReader interface { io.Reader resource.Finalizer // Segment gets the segment read by this reader Segment() (ts.Segment, error) // Reset resets the reader to read a new segment Reset(segment ts.Segment) // Clone returns a clone of the underlying data reset Clone() (SegmentReader, error) }
SegmentReader implements the io reader interface backed by a segment
func NewSegmentReader ¶
func NewSegmentReader(segment ts.Segment) SegmentReader
NewSegmentReader creates a new segment reader along with a specified segment.
type SegmentReaderPool ¶
type SegmentReaderPool interface { // Init will initialize the pool Init() // Get provides a segment reader from the pool Get() SegmentReader // Put returns a segment reader to the pool Put(sr SegmentReader) }
SegmentReaderPool provides a pool for segment readers
func NewSegmentReaderPool ¶
func NewSegmentReaderPool(opts pool.ObjectPoolOptions) SegmentReaderPool
NewSegmentReaderPool creates a new pool