Documentation ¶
Overview ¶
Package mem is a generated GoMock package.
Index ¶
- func Merge(target sgmt.MutableSegment, srcs ...sgmt.MutableSegment) error
- func NewSegment(opts Options) (segment.MutableSegment, error)
- type MockReadableSegment
- func (m *MockReadableSegment) ContainsField(arg0 []byte) (bool, error)
- func (m *MockReadableSegment) EXPECT() *MockReadableSegmentMockRecorder
- func (m *MockReadableSegment) Fields() (segment.FieldsIterator, error)
- func (m *MockReadableSegment) FieldsPostingsList() (segment.FieldsPostingsListIterator, error)
- func (m *MockReadableSegment) Terms(arg0 []byte) (segment.TermsIterator, error)
- type MockReadableSegmentMockRecorder
- func (mr *MockReadableSegmentMockRecorder) ContainsField(arg0 interface{}) *gomock.Call
- func (mr *MockReadableSegmentMockRecorder) Fields() *gomock.Call
- func (mr *MockReadableSegmentMockRecorder) FieldsPostingsList() *gomock.Call
- func (mr *MockReadableSegmentMockRecorder) Terms(arg0 interface{}) *gomock.Call
- type Options
- type ReadableSegment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
func Merge(target sgmt.MutableSegment, srcs ...sgmt.MutableSegment) error
Merge merges the segments `srcs` into `target`.
func NewSegment ¶
func NewSegment(opts Options) (segment.MutableSegment, error)
NewSegment returns a new in-memory mutable segment. It will start assigning postings IDs at the provided offset.
Types ¶
type MockReadableSegment ¶
type MockReadableSegment struct {
// contains filtered or unexported fields
}
MockReadableSegment is a mock of ReadableSegment interface.
func NewMockReadableSegment ¶
func NewMockReadableSegment(ctrl *gomock.Controller) *MockReadableSegment
NewMockReadableSegment creates a new mock instance.
func (*MockReadableSegment) ContainsField ¶ added in v0.15.11
func (m *MockReadableSegment) ContainsField(arg0 []byte) (bool, error)
ContainsField mocks base method.
func (*MockReadableSegment) EXPECT ¶
func (m *MockReadableSegment) EXPECT() *MockReadableSegmentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockReadableSegment) Fields ¶ added in v0.15.11
func (m *MockReadableSegment) Fields() (segment.FieldsIterator, error)
Fields mocks base method.
func (*MockReadableSegment) FieldsPostingsList ¶ added in v1.2.0
func (m *MockReadableSegment) FieldsPostingsList() (segment.FieldsPostingsListIterator, error)
FieldsPostingsList mocks base method.
func (*MockReadableSegment) Terms ¶ added in v0.15.11
func (m *MockReadableSegment) Terms(arg0 []byte) (segment.TermsIterator, error)
Terms mocks base method.
type MockReadableSegmentMockRecorder ¶
type MockReadableSegmentMockRecorder struct {
// contains filtered or unexported fields
}
MockReadableSegmentMockRecorder is the mock recorder for MockReadableSegment.
func (*MockReadableSegmentMockRecorder) ContainsField ¶ added in v0.15.11
func (mr *MockReadableSegmentMockRecorder) ContainsField(arg0 interface{}) *gomock.Call
ContainsField indicates an expected call of ContainsField.
func (*MockReadableSegmentMockRecorder) Fields ¶ added in v0.15.11
func (mr *MockReadableSegmentMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields.
func (*MockReadableSegmentMockRecorder) FieldsPostingsList ¶ added in v1.2.0
func (mr *MockReadableSegmentMockRecorder) FieldsPostingsList() *gomock.Call
FieldsPostingsList indicates an expected call of FieldsPostingsList.
func (*MockReadableSegmentMockRecorder) Terms ¶ added in v0.15.11
func (mr *MockReadableSegmentMockRecorder) Terms(arg0 interface{}) *gomock.Call
Terms indicates an expected call of Terms.
type Options ¶
type Options interface { // SetInstrumentOptions sets the instrument options. SetInstrumentOptions(value instrument.Options) Options // InstrumentOptions returns the instrument options. InstrumentOptions() instrument.Options // SetBytesSliceArrayPool sets the bytes slice array pool. SetBytesSliceArrayPool(value bytes.SliceArrayPool) Options // BytesSliceArrayPool returns the bytes slice array pool. BytesSliceArrayPool() bytes.SliceArrayPool // SetPostingsListPool sets the postings list pool. SetPostingsListPool(value postings.Pool) Options // PostingsListPool returns the postings list pool. PostingsListPool() postings.Pool // SetInitialCapacity sets the initial capacity. SetInitialCapacity(value int) Options // InitialCapacity returns the initial capacity. InitialCapacity() int // SetNewUUIDFn sets the function used to generate new UUIDs. SetNewUUIDFn(value util.NewUUIDFn) Options // NewUUIDFn returns the function used to generate new UUIDs. NewUUIDFn() util.NewUUIDFn }
Options is a collection of knobs for an in-memory segment.
type ReadableSegment ¶
type ReadableSegment interface { Fields() (sgmt.FieldsIterator, error) ContainsField(field []byte) (bool, error) Terms(field []byte) (sgmt.TermsIterator, error) FieldsPostingsList() (sgmt.FieldsPostingsListIterator, error) // contains filtered or unexported methods }
ReadableSegment is an internal interface for reading from a segment.
NB(jeromefroe): Currently mockgen requires that interfaces with embedded interfaces be generated with reflection mode, but private interfaces can only be generated with file mode so we can't mock this interface if its private. Once mockgen supports mocking private interfaces which contain embedded interfaces we can make this interface private.