Documentation ¶
Overview ¶
Package wide is a generated GoMock package.
Index ¶
- type EntryChecksumMismatchChecker
- type IndexChecksumBlockBatch
- type IndexChecksumBlockBatchReader
- type MockEntryChecksumMismatchChecker
- func (m *MockEntryChecksumMismatchChecker) ComputeMismatchesForEntry(arg0 xio.IndexChecksum) ([]ReadMismatch, error)
- func (m *MockEntryChecksumMismatchChecker) Drain() []ReadMismatch
- func (m *MockEntryChecksumMismatchChecker) EXPECT() *MockEntryChecksumMismatchCheckerMockRecorder
- func (m *MockEntryChecksumMismatchChecker) Lock()
- func (m *MockEntryChecksumMismatchChecker) Unlock()
- type MockEntryChecksumMismatchCheckerMockRecorder
- func (mr *MockEntryChecksumMismatchCheckerMockRecorder) ComputeMismatchesForEntry(arg0 interface{}) *gomock.Call
- func (mr *MockEntryChecksumMismatchCheckerMockRecorder) Drain() *gomock.Call
- func (mr *MockEntryChecksumMismatchCheckerMockRecorder) Lock() *gomock.Call
- func (mr *MockEntryChecksumMismatchCheckerMockRecorder) Unlock() *gomock.Call
- type MockStreamedMismatch
- type MockStreamedMismatchMockRecorder
- type Options
- type ReadMismatch
- type StreamedMismatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryChecksumMismatchChecker ¶
type EntryChecksumMismatchChecker interface { // ComputeMismatchesForEntry determines if the given index entry is a mismatch. ComputeMismatchesForEntry(entry xio.IndexChecksum) ([]ReadMismatch, error) // Drain returns any unconsumed IndexChecksumBlockBatches as mismatches. Drain() []ReadMismatch // Lock sets a mutex on this mismatch checker. Lock() // Unlock unlocks the mutex on the mismatch checker. Unlock() }
EntryChecksumMismatchChecker checks if a given entry should yield a mismatch.
func NewEntryChecksumMismatchChecker ¶
func NewEntryChecksumMismatchChecker( blockReader IndexChecksumBlockBatchReader, opts Options, ) EntryChecksumMismatchChecker
NewEntryChecksumMismatchChecker creates a new entry checksum mismatch checker, backed by the given block reader. NB: index entries MUST be checked in lexicographical order by ID.
type IndexChecksumBlockBatch ¶
type IndexChecksumBlockBatch struct { // Checksums is the list of index checksums. Checksums []int64 // EndMarker is a batch marker, signifying the ID of the // last element in the batch. EndMarker []byte }
IndexChecksumBlockBatch represents a batch of index checksums originating from a single series block.
type IndexChecksumBlockBatchReader ¶
type IndexChecksumBlockBatchReader interface { // Next moves to the next IndexChecksumBlockBatch element. Next() bool // Current yields the current IndexChecksumBlockBatch. Current() IndexChecksumBlockBatch // Close closes the reader, draining any incoming reads without using them. Close() }
IndexChecksumBlockBatchReader is a reader across IndexChecksumBlockBatches.
func NewIndexChecksumBlockBatchReader ¶
func NewIndexChecksumBlockBatchReader( blockInput chan IndexChecksumBlockBatch, ) IndexChecksumBlockBatchReader
NewIndexChecksumBlockBatchReader creates a new IndexChecksumBlockBatchReader.
type MockEntryChecksumMismatchChecker ¶
type MockEntryChecksumMismatchChecker struct {
// contains filtered or unexported fields
}
MockEntryChecksumMismatchChecker is a mock of EntryChecksumMismatchChecker interface
func NewMockEntryChecksumMismatchChecker ¶
func NewMockEntryChecksumMismatchChecker(ctrl *gomock.Controller) *MockEntryChecksumMismatchChecker
NewMockEntryChecksumMismatchChecker creates a new mock instance
func (*MockEntryChecksumMismatchChecker) ComputeMismatchesForEntry ¶
func (m *MockEntryChecksumMismatchChecker) ComputeMismatchesForEntry(arg0 xio.IndexChecksum) ([]ReadMismatch, error)
ComputeMismatchesForEntry mocks base method
func (*MockEntryChecksumMismatchChecker) Drain ¶
func (m *MockEntryChecksumMismatchChecker) Drain() []ReadMismatch
Drain mocks base method
func (*MockEntryChecksumMismatchChecker) EXPECT ¶
func (m *MockEntryChecksumMismatchChecker) EXPECT() *MockEntryChecksumMismatchCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockEntryChecksumMismatchChecker) Lock ¶
func (m *MockEntryChecksumMismatchChecker) Lock()
Lock mocks base method
func (*MockEntryChecksumMismatchChecker) Unlock ¶
func (m *MockEntryChecksumMismatchChecker) Unlock()
Unlock mocks base method
type MockEntryChecksumMismatchCheckerMockRecorder ¶
type MockEntryChecksumMismatchCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockEntryChecksumMismatchCheckerMockRecorder is the mock recorder for MockEntryChecksumMismatchChecker
func (*MockEntryChecksumMismatchCheckerMockRecorder) ComputeMismatchesForEntry ¶
func (mr *MockEntryChecksumMismatchCheckerMockRecorder) ComputeMismatchesForEntry(arg0 interface{}) *gomock.Call
ComputeMismatchesForEntry indicates an expected call of ComputeMismatchesForEntry
func (*MockEntryChecksumMismatchCheckerMockRecorder) Drain ¶
func (mr *MockEntryChecksumMismatchCheckerMockRecorder) Drain() *gomock.Call
Drain indicates an expected call of Drain
func (*MockEntryChecksumMismatchCheckerMockRecorder) Lock ¶
func (mr *MockEntryChecksumMismatchCheckerMockRecorder) Lock() *gomock.Call
Lock indicates an expected call of Lock
func (*MockEntryChecksumMismatchCheckerMockRecorder) Unlock ¶
func (mr *MockEntryChecksumMismatchCheckerMockRecorder) Unlock() *gomock.Call
Unlock indicates an expected call of Unlock
type MockStreamedMismatch ¶
type MockStreamedMismatch struct {
// contains filtered or unexported fields
}
MockStreamedMismatch is a mock of StreamedMismatch interface
func NewMockStreamedMismatch ¶
func NewMockStreamedMismatch(ctrl *gomock.Controller) *MockStreamedMismatch
NewMockStreamedMismatch creates a new mock instance
func (*MockStreamedMismatch) EXPECT ¶
func (m *MockStreamedMismatch) EXPECT() *MockStreamedMismatchMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStreamedMismatch) RetrieveMismatch ¶
func (m *MockStreamedMismatch) RetrieveMismatch() (ReadMismatch, error)
RetrieveMismatch mocks base method
type MockStreamedMismatchMockRecorder ¶
type MockStreamedMismatchMockRecorder struct {
// contains filtered or unexported fields
}
MockStreamedMismatchMockRecorder is the mock recorder for MockStreamedMismatch
func (*MockStreamedMismatchMockRecorder) RetrieveMismatch ¶
func (mr *MockStreamedMismatchMockRecorder) RetrieveMismatch() *gomock.Call
RetrieveMismatch indicates an expected call of RetrieveMismatch
type Options ¶
type Options interface { // Validate will validate the options and return an error if not valid. Validate() error // SetBatchSize sets the batch size. SetBatchSize(value int) Options // BatchSize returns the batch size. BatchSize() int // SetDecodingOptions sets the decoding options. SetDecodingOptions(value msgpack.DecodingOptions) Options // DecodingOptions returns the decoding options. DecodingOptions() msgpack.DecodingOptions // SetInstrumentOptions sets the instrumentation options. SetInstrumentOptions(value instrument.Options) Options // InstrumentOptions returns the instrumentation options. InstrumentOptions() instrument.Options }
Options represents the options for mismatch calculation.
type ReadMismatch ¶
type ReadMismatch struct { // ReadMismatch extends IndexChecksum with additional mismatch fields. xio.IndexChecksum // Data is the data for the read mismatch. Set only on reader mismatches. Data checked.Bytes }
ReadMismatch describes a series that does not match the expected wide index checksum, with a descriptor of the mismatch. This can indicate both scenarios where the expected checksum was not found, and when there is a mismatch.
func (ReadMismatch) IsReaderMismatch ¶
func (r ReadMismatch) IsReaderMismatch() bool
IsReaderMismatch is true if this mismatch is this mismatch is on the reader side.
type StreamedMismatch ¶
type StreamedMismatch interface { // RetrieveMismatch retrieves the mismatch. RetrieveMismatch() (ReadMismatch, error) }
StreamedMismatch yields a ReadMismatch value asynchronously, and any errors encountered during execution.
var EmptyStreamedMismatch StreamedMismatch = emptyStreamedMismatch{}
EmptyStreamedMismatch is an empty streamed mismatch batch.