Documentation ¶
Overview ¶
Package segment is a generated GoMock package.
Index ¶
- Variables
- type Builder
- type DocumentsBuilder
- type FieldsIterable
- type FieldsIterator
- type ImmutableSegment
- type MockBuilder
- func (m *MockBuilder) AllDocs() (index.IDDocIterator, error)
- func (m *MockBuilder) Docs() []doc.Document
- func (m *MockBuilder) EXPECT() *MockBuilderMockRecorder
- func (m *MockBuilder) Fields() (FieldsIterator, error)
- func (m *MockBuilder) Reset(offset postings.ID)
- func (m *MockBuilder) Terms(field []byte) (TermsIterator, error)
- type MockBuilderMockRecorder
- func (mr *MockBuilderMockRecorder) AllDocs() *gomock.Call
- func (mr *MockBuilderMockRecorder) Docs() *gomock.Call
- func (mr *MockBuilderMockRecorder) Fields() *gomock.Call
- func (mr *MockBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
- func (mr *MockBuilderMockRecorder) Terms(field interface{}) *gomock.Call
- type MockDocumentsBuilder
- func (m *MockDocumentsBuilder) AllDocs() (index.IDDocIterator, error)
- func (m *MockDocumentsBuilder) Docs() []doc.Document
- func (m *MockDocumentsBuilder) EXPECT() *MockDocumentsBuilderMockRecorder
- func (m *MockDocumentsBuilder) Fields() (FieldsIterator, error)
- func (m *MockDocumentsBuilder) Insert(d doc.Document) ([]byte, error)
- func (m *MockDocumentsBuilder) InsertBatch(b index.Batch) error
- func (m *MockDocumentsBuilder) Reset(offset postings.ID)
- func (m *MockDocumentsBuilder) Terms(field []byte) (TermsIterator, error)
- type MockDocumentsBuilderMockRecorder
- func (mr *MockDocumentsBuilderMockRecorder) AllDocs() *gomock.Call
- func (mr *MockDocumentsBuilderMockRecorder) Docs() *gomock.Call
- func (mr *MockDocumentsBuilderMockRecorder) Fields() *gomock.Call
- func (mr *MockDocumentsBuilderMockRecorder) Insert(d interface{}) *gomock.Call
- func (mr *MockDocumentsBuilderMockRecorder) InsertBatch(b interface{}) *gomock.Call
- func (mr *MockDocumentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
- func (mr *MockDocumentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call
- type MockFieldsIterable
- type MockFieldsIterableMockRecorder
- type MockFieldsIterator
- type MockFieldsIteratorMockRecorder
- type MockImmutableSegment
- func (m *MockImmutableSegment) Close() error
- func (m *MockImmutableSegment) ContainsField(field []byte) (bool, error)
- func (m *MockImmutableSegment) ContainsID(docID []byte) (bool, error)
- func (m *MockImmutableSegment) EXPECT() *MockImmutableSegmentMockRecorder
- func (m *MockImmutableSegment) FieldsIterable() FieldsIterable
- func (m *MockImmutableSegment) FreeMmap() error
- func (m *MockImmutableSegment) Reader() (index.Reader, error)
- func (m *MockImmutableSegment) Size() int64
- func (m *MockImmutableSegment) TermsIterable() TermsIterable
- type MockImmutableSegmentMockRecorder
- func (mr *MockImmutableSegmentMockRecorder) Close() *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) FieldsIterable() *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) FreeMmap() *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) Reader() *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) Size() *gomock.Call
- func (mr *MockImmutableSegmentMockRecorder) TermsIterable() *gomock.Call
- type MockMutableSegment
- func (m *MockMutableSegment) AllDocs() (index.IDDocIterator, error)
- func (m *MockMutableSegment) Close() error
- func (m *MockMutableSegment) ContainsField(field []byte) (bool, error)
- func (m *MockMutableSegment) ContainsID(docID []byte) (bool, error)
- func (m *MockMutableSegment) Docs() []doc.Document
- func (m *MockMutableSegment) EXPECT() *MockMutableSegmentMockRecorder
- func (m *MockMutableSegment) Fields() (FieldsIterator, error)
- func (m *MockMutableSegment) FieldsIterable() FieldsIterable
- func (m *MockMutableSegment) Insert(d doc.Document) ([]byte, error)
- func (m *MockMutableSegment) InsertBatch(b index.Batch) error
- func (m *MockMutableSegment) IsSealed() bool
- func (m *MockMutableSegment) Offset() postings.ID
- func (m *MockMutableSegment) Reader() (index.Reader, error)
- func (m *MockMutableSegment) Reset(offset postings.ID)
- func (m *MockMutableSegment) Seal() error
- func (m *MockMutableSegment) Size() int64
- func (m *MockMutableSegment) Terms(field []byte) (TermsIterator, error)
- func (m *MockMutableSegment) TermsIterable() TermsIterable
- type MockMutableSegmentMockRecorder
- func (mr *MockMutableSegmentMockRecorder) AllDocs() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Close() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Docs() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Fields() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) FieldsIterable() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Insert(d interface{}) *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) InsertBatch(b interface{}) *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) IsSealed() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Offset() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Reader() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Reset(offset interface{}) *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Seal() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Size() *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) Terms(field interface{}) *gomock.Call
- func (mr *MockMutableSegmentMockRecorder) TermsIterable() *gomock.Call
- type MockOrderedBytesIterator
- type MockOrderedBytesIteratorMockRecorder
- type MockSegment
- func (m *MockSegment) Close() error
- func (m *MockSegment) ContainsField(field []byte) (bool, error)
- func (m *MockSegment) ContainsID(docID []byte) (bool, error)
- func (m *MockSegment) EXPECT() *MockSegmentMockRecorder
- func (m *MockSegment) FieldsIterable() FieldsIterable
- func (m *MockSegment) Reader() (index.Reader, error)
- func (m *MockSegment) Size() int64
- func (m *MockSegment) TermsIterable() TermsIterable
- type MockSegmentMockRecorder
- func (mr *MockSegmentMockRecorder) Close() *gomock.Call
- func (mr *MockSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) FieldsIterable() *gomock.Call
- func (mr *MockSegmentMockRecorder) Reader() *gomock.Call
- func (mr *MockSegmentMockRecorder) Size() *gomock.Call
- func (mr *MockSegmentMockRecorder) TermsIterable() *gomock.Call
- type MockSegmentsBuilder
- func (m *MockSegmentsBuilder) AddSegments(segments []Segment) error
- func (m *MockSegmentsBuilder) AllDocs() (index.IDDocIterator, error)
- func (m *MockSegmentsBuilder) Docs() []doc.Document
- func (m *MockSegmentsBuilder) EXPECT() *MockSegmentsBuilderMockRecorder
- func (m *MockSegmentsBuilder) Fields() (FieldsIterator, error)
- func (m *MockSegmentsBuilder) Reset(offset postings.ID)
- func (m *MockSegmentsBuilder) Terms(field []byte) (TermsIterator, error)
- type MockSegmentsBuilderMockRecorder
- func (mr *MockSegmentsBuilderMockRecorder) AddSegments(segments interface{}) *gomock.Call
- func (mr *MockSegmentsBuilderMockRecorder) AllDocs() *gomock.Call
- func (mr *MockSegmentsBuilderMockRecorder) Docs() *gomock.Call
- func (mr *MockSegmentsBuilderMockRecorder) Fields() *gomock.Call
- func (mr *MockSegmentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
- func (mr *MockSegmentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call
- type MockTermsIterable
- type MockTermsIterableMockRecorder
- type MockTermsIterator
- type MockTermsIteratorMockRecorder
- type MutableSegment
- type OrderedBytesIterator
- type Segment
- type SegmentsBuilder
- type TermsIterable
- type TermsIterator
Constants ¶
This section is empty.
Variables ¶
var ( // ErrClosed is the error returned when attempting to perform operations on a // segment that has already been closed. ErrClosed = errors.New("segment has been closed") )
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v0.5.0
type Builder interface { FieldsIterable TermsIterable // Reset resets the builder for reuse. Reset(offset postings.ID) // Docs returns the current docs slice, this is not safe to modify // and is invalidated on a call to reset. Docs() []doc.Document // AllDocs returns an iterator over the documents known to the Reader. AllDocs() (index.IDDocIterator, error) }
Builder is a builder that can be used to construct segments.
type DocumentsBuilder ¶ added in v0.5.0
DocumentsBuilder is a builder is written documents to.
type FieldsIterable ¶ added in v0.5.0
type FieldsIterable interface { // Fields returns an iterator over the list of known fields, in order // by name, it is not valid for reading after mutating the // builder by inserting more documents. Fields() (FieldsIterator, error) }
FieldsIterable can iterate over segment fields, it is not by default concurrency safe.
type FieldsIterator ¶ added in v0.4.1
type FieldsIterator interface { // Next returns a bool indicating if there are any more elements. Next() bool // Current returns the current element. // NB: the element returned is only valid until the subsequent call to Next(). Current() []byte // Err returns any errors encountered during iteration. Err() error // Close releases any resources held by the iterator. Close() error }
FieldsIterator iterates over all known fields.
type ImmutableSegment ¶ added in v0.15.0
ImmutableSegment is segment that has been written to disk.
type MockBuilder ¶ added in v0.5.0
type MockBuilder struct {
// contains filtered or unexported fields
}
MockBuilder is a mock of Builder interface
func NewMockBuilder ¶ added in v0.5.0
func NewMockBuilder(ctrl *gomock.Controller) *MockBuilder
NewMockBuilder creates a new mock instance
func (*MockBuilder) AllDocs ¶ added in v0.5.0
func (m *MockBuilder) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockBuilder) Docs ¶ added in v0.5.0
func (m *MockBuilder) Docs() []doc.Document
Docs mocks base method
func (*MockBuilder) EXPECT ¶ added in v0.5.0
func (m *MockBuilder) EXPECT() *MockBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBuilder) Fields ¶ added in v0.5.0
func (m *MockBuilder) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockBuilder) Reset ¶ added in v0.5.0
func (m *MockBuilder) Reset(offset postings.ID)
Reset mocks base method
func (*MockBuilder) Terms ¶ added in v0.5.0
func (m *MockBuilder) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockBuilderMockRecorder ¶ added in v0.5.0
type MockBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockBuilderMockRecorder is the mock recorder for MockBuilder
func (*MockBuilderMockRecorder) AllDocs ¶ added in v0.5.0
func (mr *MockBuilderMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockBuilderMockRecorder) Docs ¶ added in v0.5.0
func (mr *MockBuilderMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockBuilderMockRecorder) Fields ¶ added in v0.5.0
func (mr *MockBuilderMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockBuilderMockRecorder) Reset ¶ added in v0.5.0
func (mr *MockBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockBuilderMockRecorder) Terms ¶ added in v0.5.0
func (mr *MockBuilderMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockDocumentsBuilder ¶ added in v0.9.0
type MockDocumentsBuilder struct {
// contains filtered or unexported fields
}
MockDocumentsBuilder is a mock of DocumentsBuilder interface
func NewMockDocumentsBuilder ¶ added in v0.9.0
func NewMockDocumentsBuilder(ctrl *gomock.Controller) *MockDocumentsBuilder
NewMockDocumentsBuilder creates a new mock instance
func (*MockDocumentsBuilder) AllDocs ¶ added in v0.9.0
func (m *MockDocumentsBuilder) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockDocumentsBuilder) Docs ¶ added in v0.9.0
func (m *MockDocumentsBuilder) Docs() []doc.Document
Docs mocks base method
func (*MockDocumentsBuilder) EXPECT ¶ added in v0.9.0
func (m *MockDocumentsBuilder) EXPECT() *MockDocumentsBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDocumentsBuilder) Fields ¶ added in v0.9.0
func (m *MockDocumentsBuilder) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockDocumentsBuilder) Insert ¶ added in v0.9.0
func (m *MockDocumentsBuilder) Insert(d doc.Document) ([]byte, error)
Insert mocks base method
func (*MockDocumentsBuilder) InsertBatch ¶ added in v0.9.0
func (m *MockDocumentsBuilder) InsertBatch(b index.Batch) error
InsertBatch mocks base method
func (*MockDocumentsBuilder) Reset ¶ added in v0.9.0
func (m *MockDocumentsBuilder) Reset(offset postings.ID)
Reset mocks base method
func (*MockDocumentsBuilder) Terms ¶ added in v0.9.0
func (m *MockDocumentsBuilder) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockDocumentsBuilderMockRecorder ¶ added in v0.9.0
type MockDocumentsBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockDocumentsBuilderMockRecorder is the mock recorder for MockDocumentsBuilder
func (*MockDocumentsBuilderMockRecorder) AllDocs ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockDocumentsBuilderMockRecorder) Docs ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockDocumentsBuilderMockRecorder) Fields ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockDocumentsBuilderMockRecorder) Insert ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) Insert(d interface{}) *gomock.Call
Insert indicates an expected call of Insert
func (*MockDocumentsBuilderMockRecorder) InsertBatch ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) InsertBatch(b interface{}) *gomock.Call
InsertBatch indicates an expected call of InsertBatch
func (*MockDocumentsBuilderMockRecorder) Reset ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockDocumentsBuilderMockRecorder) Terms ¶ added in v0.9.0
func (mr *MockDocumentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockFieldsIterable ¶ added in v0.9.0
type MockFieldsIterable struct {
// contains filtered or unexported fields
}
MockFieldsIterable is a mock of FieldsIterable interface
func NewMockFieldsIterable ¶ added in v0.9.0
func NewMockFieldsIterable(ctrl *gomock.Controller) *MockFieldsIterable
NewMockFieldsIterable creates a new mock instance
func (*MockFieldsIterable) EXPECT ¶ added in v0.9.0
func (m *MockFieldsIterable) EXPECT() *MockFieldsIterableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFieldsIterable) Fields ¶ added in v0.9.0
func (m *MockFieldsIterable) Fields() (FieldsIterator, error)
Fields mocks base method
type MockFieldsIterableMockRecorder ¶ added in v0.9.0
type MockFieldsIterableMockRecorder struct {
// contains filtered or unexported fields
}
MockFieldsIterableMockRecorder is the mock recorder for MockFieldsIterable
func (*MockFieldsIterableMockRecorder) Fields ¶ added in v0.9.0
func (mr *MockFieldsIterableMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
type MockFieldsIterator ¶ added in v0.9.0
type MockFieldsIterator struct {
// contains filtered or unexported fields
}
MockFieldsIterator is a mock of FieldsIterator interface
func NewMockFieldsIterator ¶ added in v0.9.0
func NewMockFieldsIterator(ctrl *gomock.Controller) *MockFieldsIterator
NewMockFieldsIterator creates a new mock instance
func (*MockFieldsIterator) Close ¶ added in v0.9.0
func (m *MockFieldsIterator) Close() error
Close mocks base method
func (*MockFieldsIterator) Current ¶ added in v0.9.0
func (m *MockFieldsIterator) Current() []byte
Current mocks base method
func (*MockFieldsIterator) EXPECT ¶ added in v0.9.0
func (m *MockFieldsIterator) EXPECT() *MockFieldsIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFieldsIterator) Err ¶ added in v0.9.0
func (m *MockFieldsIterator) Err() error
Err mocks base method
func (*MockFieldsIterator) Next ¶ added in v0.9.0
func (m *MockFieldsIterator) Next() bool
Next mocks base method
type MockFieldsIteratorMockRecorder ¶ added in v0.9.0
type MockFieldsIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockFieldsIteratorMockRecorder is the mock recorder for MockFieldsIterator
func (*MockFieldsIteratorMockRecorder) Close ¶ added in v0.9.0
func (mr *MockFieldsIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockFieldsIteratorMockRecorder) Current ¶ added in v0.9.0
func (mr *MockFieldsIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockFieldsIteratorMockRecorder) Err ¶ added in v0.9.0
func (mr *MockFieldsIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockFieldsIteratorMockRecorder) Next ¶ added in v0.9.0
func (mr *MockFieldsIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
type MockImmutableSegment ¶ added in v0.15.0
type MockImmutableSegment struct {
// contains filtered or unexported fields
}
MockImmutableSegment is a mock of ImmutableSegment interface
func NewMockImmutableSegment ¶ added in v0.15.0
func NewMockImmutableSegment(ctrl *gomock.Controller) *MockImmutableSegment
NewMockImmutableSegment creates a new mock instance
func (*MockImmutableSegment) Close ¶ added in v0.15.0
func (m *MockImmutableSegment) Close() error
Close mocks base method
func (*MockImmutableSegment) ContainsField ¶ added in v0.15.0
func (m *MockImmutableSegment) ContainsField(field []byte) (bool, error)
ContainsField mocks base method
func (*MockImmutableSegment) ContainsID ¶ added in v0.15.0
func (m *MockImmutableSegment) ContainsID(docID []byte) (bool, error)
ContainsID mocks base method
func (*MockImmutableSegment) EXPECT ¶ added in v0.15.0
func (m *MockImmutableSegment) EXPECT() *MockImmutableSegmentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockImmutableSegment) FieldsIterable ¶ added in v0.15.0
func (m *MockImmutableSegment) FieldsIterable() FieldsIterable
FieldsIterable mocks base method
func (*MockImmutableSegment) FreeMmap ¶ added in v0.15.0
func (m *MockImmutableSegment) FreeMmap() error
FreeMmap mocks base method
func (*MockImmutableSegment) Reader ¶ added in v0.15.0
func (m *MockImmutableSegment) Reader() (index.Reader, error)
Reader mocks base method
func (*MockImmutableSegment) Size ¶ added in v0.15.0
func (m *MockImmutableSegment) Size() int64
Size mocks base method
func (*MockImmutableSegment) TermsIterable ¶ added in v0.15.0
func (m *MockImmutableSegment) TermsIterable() TermsIterable
TermsIterable mocks base method
type MockImmutableSegmentMockRecorder ¶ added in v0.15.0
type MockImmutableSegmentMockRecorder struct {
// contains filtered or unexported fields
}
MockImmutableSegmentMockRecorder is the mock recorder for MockImmutableSegment
func (*MockImmutableSegmentMockRecorder) Close ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockImmutableSegmentMockRecorder) ContainsField ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call
ContainsField indicates an expected call of ContainsField
func (*MockImmutableSegmentMockRecorder) ContainsID ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call
ContainsID indicates an expected call of ContainsID
func (*MockImmutableSegmentMockRecorder) FieldsIterable ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) FieldsIterable() *gomock.Call
FieldsIterable indicates an expected call of FieldsIterable
func (*MockImmutableSegmentMockRecorder) FreeMmap ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) FreeMmap() *gomock.Call
FreeMmap indicates an expected call of FreeMmap
func (*MockImmutableSegmentMockRecorder) Reader ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) Reader() *gomock.Call
Reader indicates an expected call of Reader
func (*MockImmutableSegmentMockRecorder) Size ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size
func (*MockImmutableSegmentMockRecorder) TermsIterable ¶ added in v0.15.0
func (mr *MockImmutableSegmentMockRecorder) TermsIterable() *gomock.Call
TermsIterable indicates an expected call of TermsIterable
type MockMutableSegment ¶
type MockMutableSegment struct {
// contains filtered or unexported fields
}
MockMutableSegment is a mock of MutableSegment interface
func NewMockMutableSegment ¶
func NewMockMutableSegment(ctrl *gomock.Controller) *MockMutableSegment
NewMockMutableSegment creates a new mock instance
func (*MockMutableSegment) AllDocs ¶ added in v0.5.0
func (m *MockMutableSegment) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockMutableSegment) Close ¶
func (m *MockMutableSegment) Close() error
Close mocks base method
func (*MockMutableSegment) ContainsField ¶ added in v0.9.1
func (m *MockMutableSegment) ContainsField(field []byte) (bool, error)
ContainsField mocks base method
func (*MockMutableSegment) ContainsID ¶
func (m *MockMutableSegment) ContainsID(docID []byte) (bool, error)
ContainsID mocks base method
func (*MockMutableSegment) Docs ¶ added in v0.5.0
func (m *MockMutableSegment) Docs() []doc.Document
Docs mocks base method
func (*MockMutableSegment) EXPECT ¶
func (m *MockMutableSegment) EXPECT() *MockMutableSegmentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockMutableSegment) Fields ¶
func (m *MockMutableSegment) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockMutableSegment) FieldsIterable ¶ added in v0.5.0
func (m *MockMutableSegment) FieldsIterable() FieldsIterable
FieldsIterable mocks base method
func (*MockMutableSegment) Insert ¶
func (m *MockMutableSegment) Insert(d doc.Document) ([]byte, error)
Insert mocks base method
func (*MockMutableSegment) InsertBatch ¶
func (m *MockMutableSegment) InsertBatch(b index.Batch) error
InsertBatch mocks base method
func (*MockMutableSegment) IsSealed ¶
func (m *MockMutableSegment) IsSealed() bool
IsSealed mocks base method
func (*MockMutableSegment) Offset ¶ added in v0.5.0
func (m *MockMutableSegment) Offset() postings.ID
Offset mocks base method
func (*MockMutableSegment) Reader ¶
func (m *MockMutableSegment) Reader() (index.Reader, error)
Reader mocks base method
func (*MockMutableSegment) Reset ¶ added in v0.5.0
func (m *MockMutableSegment) Reset(offset postings.ID)
Reset mocks base method
func (*MockMutableSegment) Terms ¶
func (m *MockMutableSegment) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
func (*MockMutableSegment) TermsIterable ¶ added in v0.5.0
func (m *MockMutableSegment) TermsIterable() TermsIterable
TermsIterable mocks base method
type MockMutableSegmentMockRecorder ¶
type MockMutableSegmentMockRecorder struct {
// contains filtered or unexported fields
}
MockMutableSegmentMockRecorder is the mock recorder for MockMutableSegment
func (*MockMutableSegmentMockRecorder) AllDocs ¶ added in v0.5.0
func (mr *MockMutableSegmentMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockMutableSegmentMockRecorder) Close ¶
func (mr *MockMutableSegmentMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockMutableSegmentMockRecorder) ContainsField ¶ added in v0.9.1
func (mr *MockMutableSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call
ContainsField indicates an expected call of ContainsField
func (*MockMutableSegmentMockRecorder) ContainsID ¶
func (mr *MockMutableSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call
ContainsID indicates an expected call of ContainsID
func (*MockMutableSegmentMockRecorder) Docs ¶ added in v0.5.0
func (mr *MockMutableSegmentMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockMutableSegmentMockRecorder) Fields ¶
func (mr *MockMutableSegmentMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockMutableSegmentMockRecorder) FieldsIterable ¶ added in v0.5.0
func (mr *MockMutableSegmentMockRecorder) FieldsIterable() *gomock.Call
FieldsIterable indicates an expected call of FieldsIterable
func (*MockMutableSegmentMockRecorder) Insert ¶
func (mr *MockMutableSegmentMockRecorder) Insert(d interface{}) *gomock.Call
Insert indicates an expected call of Insert
func (*MockMutableSegmentMockRecorder) InsertBatch ¶
func (mr *MockMutableSegmentMockRecorder) InsertBatch(b interface{}) *gomock.Call
InsertBatch indicates an expected call of InsertBatch
func (*MockMutableSegmentMockRecorder) IsSealed ¶
func (mr *MockMutableSegmentMockRecorder) IsSealed() *gomock.Call
IsSealed indicates an expected call of IsSealed
func (*MockMutableSegmentMockRecorder) Offset ¶ added in v0.5.0
func (mr *MockMutableSegmentMockRecorder) Offset() *gomock.Call
Offset indicates an expected call of Offset
func (*MockMutableSegmentMockRecorder) Reader ¶
func (mr *MockMutableSegmentMockRecorder) Reader() *gomock.Call
Reader indicates an expected call of Reader
func (*MockMutableSegmentMockRecorder) Reset ¶ added in v0.5.0
func (mr *MockMutableSegmentMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockMutableSegmentMockRecorder) Seal ¶
func (mr *MockMutableSegmentMockRecorder) Seal() *gomock.Call
Seal indicates an expected call of Seal
func (*MockMutableSegmentMockRecorder) Size ¶
func (mr *MockMutableSegmentMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size
func (*MockMutableSegmentMockRecorder) Terms ¶
func (mr *MockMutableSegmentMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
func (*MockMutableSegmentMockRecorder) TermsIterable ¶ added in v0.5.0
func (mr *MockMutableSegmentMockRecorder) TermsIterable() *gomock.Call
TermsIterable indicates an expected call of TermsIterable
type MockOrderedBytesIterator ¶ added in v0.9.0
type MockOrderedBytesIterator struct {
// contains filtered or unexported fields
}
MockOrderedBytesIterator is a mock of OrderedBytesIterator interface
func NewMockOrderedBytesIterator ¶ added in v0.9.0
func NewMockOrderedBytesIterator(ctrl *gomock.Controller) *MockOrderedBytesIterator
NewMockOrderedBytesIterator creates a new mock instance
func (*MockOrderedBytesIterator) Close ¶ added in v0.9.0
func (m *MockOrderedBytesIterator) Close() error
Close mocks base method
func (*MockOrderedBytesIterator) Current ¶ added in v0.9.0
func (m *MockOrderedBytesIterator) Current() []byte
Current mocks base method
func (*MockOrderedBytesIterator) EXPECT ¶ added in v0.9.0
func (m *MockOrderedBytesIterator) EXPECT() *MockOrderedBytesIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockOrderedBytesIterator) Err ¶ added in v0.9.0
func (m *MockOrderedBytesIterator) Err() error
Err mocks base method
func (*MockOrderedBytesIterator) Next ¶ added in v0.9.0
func (m *MockOrderedBytesIterator) Next() bool
Next mocks base method
type MockOrderedBytesIteratorMockRecorder ¶ added in v0.9.0
type MockOrderedBytesIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockOrderedBytesIteratorMockRecorder is the mock recorder for MockOrderedBytesIterator
func (*MockOrderedBytesIteratorMockRecorder) Close ¶ added in v0.9.0
func (mr *MockOrderedBytesIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockOrderedBytesIteratorMockRecorder) Current ¶ added in v0.9.0
func (mr *MockOrderedBytesIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockOrderedBytesIteratorMockRecorder) Err ¶ added in v0.9.0
func (mr *MockOrderedBytesIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockOrderedBytesIteratorMockRecorder) Next ¶ added in v0.9.0
func (mr *MockOrderedBytesIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
type MockSegment ¶
type MockSegment struct {
// contains filtered or unexported fields
}
MockSegment is a mock of Segment interface
func NewMockSegment ¶
func NewMockSegment(ctrl *gomock.Controller) *MockSegment
NewMockSegment creates a new mock instance
func (*MockSegment) ContainsField ¶ added in v0.9.1
func (m *MockSegment) ContainsField(field []byte) (bool, error)
ContainsField mocks base method
func (*MockSegment) ContainsID ¶
func (m *MockSegment) ContainsID(docID []byte) (bool, error)
ContainsID mocks base method
func (*MockSegment) EXPECT ¶
func (m *MockSegment) EXPECT() *MockSegmentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSegment) FieldsIterable ¶ added in v0.5.0
func (m *MockSegment) FieldsIterable() FieldsIterable
FieldsIterable mocks base method
func (*MockSegment) Reader ¶
func (m *MockSegment) Reader() (index.Reader, error)
Reader mocks base method
func (*MockSegment) TermsIterable ¶ added in v0.5.0
func (m *MockSegment) TermsIterable() TermsIterable
TermsIterable mocks base method
type MockSegmentMockRecorder ¶
type MockSegmentMockRecorder struct {
// contains filtered or unexported fields
}
MockSegmentMockRecorder is the mock recorder for MockSegment
func (*MockSegmentMockRecorder) Close ¶
func (mr *MockSegmentMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockSegmentMockRecorder) ContainsField ¶ added in v0.9.1
func (mr *MockSegmentMockRecorder) ContainsField(field interface{}) *gomock.Call
ContainsField indicates an expected call of ContainsField
func (*MockSegmentMockRecorder) ContainsID ¶
func (mr *MockSegmentMockRecorder) ContainsID(docID interface{}) *gomock.Call
ContainsID indicates an expected call of ContainsID
func (*MockSegmentMockRecorder) FieldsIterable ¶ added in v0.5.0
func (mr *MockSegmentMockRecorder) FieldsIterable() *gomock.Call
FieldsIterable indicates an expected call of FieldsIterable
func (*MockSegmentMockRecorder) Reader ¶
func (mr *MockSegmentMockRecorder) Reader() *gomock.Call
Reader indicates an expected call of Reader
func (*MockSegmentMockRecorder) Size ¶
func (mr *MockSegmentMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size
func (*MockSegmentMockRecorder) TermsIterable ¶ added in v0.5.0
func (mr *MockSegmentMockRecorder) TermsIterable() *gomock.Call
TermsIterable indicates an expected call of TermsIterable
type MockSegmentsBuilder ¶ added in v0.9.0
type MockSegmentsBuilder struct {
// contains filtered or unexported fields
}
MockSegmentsBuilder is a mock of SegmentsBuilder interface
func NewMockSegmentsBuilder ¶ added in v0.9.0
func NewMockSegmentsBuilder(ctrl *gomock.Controller) *MockSegmentsBuilder
NewMockSegmentsBuilder creates a new mock instance
func (*MockSegmentsBuilder) AddSegments ¶ added in v0.9.0
func (m *MockSegmentsBuilder) AddSegments(segments []Segment) error
AddSegments mocks base method
func (*MockSegmentsBuilder) AllDocs ¶ added in v0.9.0
func (m *MockSegmentsBuilder) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockSegmentsBuilder) Docs ¶ added in v0.9.0
func (m *MockSegmentsBuilder) Docs() []doc.Document
Docs mocks base method
func (*MockSegmentsBuilder) EXPECT ¶ added in v0.9.0
func (m *MockSegmentsBuilder) EXPECT() *MockSegmentsBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSegmentsBuilder) Fields ¶ added in v0.9.0
func (m *MockSegmentsBuilder) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockSegmentsBuilder) Reset ¶ added in v0.9.0
func (m *MockSegmentsBuilder) Reset(offset postings.ID)
Reset mocks base method
func (*MockSegmentsBuilder) Terms ¶ added in v0.9.0
func (m *MockSegmentsBuilder) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockSegmentsBuilderMockRecorder ¶ added in v0.9.0
type MockSegmentsBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockSegmentsBuilderMockRecorder is the mock recorder for MockSegmentsBuilder
func (*MockSegmentsBuilderMockRecorder) AddSegments ¶ added in v0.9.0
func (mr *MockSegmentsBuilderMockRecorder) AddSegments(segments interface{}) *gomock.Call
AddSegments indicates an expected call of AddSegments
func (*MockSegmentsBuilderMockRecorder) AllDocs ¶ added in v0.9.0
func (mr *MockSegmentsBuilderMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockSegmentsBuilderMockRecorder) Docs ¶ added in v0.9.0
func (mr *MockSegmentsBuilderMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockSegmentsBuilderMockRecorder) Fields ¶ added in v0.9.0
func (mr *MockSegmentsBuilderMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockSegmentsBuilderMockRecorder) Reset ¶ added in v0.9.0
func (mr *MockSegmentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockSegmentsBuilderMockRecorder) Terms ¶ added in v0.9.0
func (mr *MockSegmentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockTermsIterable ¶ added in v0.9.0
type MockTermsIterable struct {
// contains filtered or unexported fields
}
MockTermsIterable is a mock of TermsIterable interface
func NewMockTermsIterable ¶ added in v0.9.0
func NewMockTermsIterable(ctrl *gomock.Controller) *MockTermsIterable
NewMockTermsIterable creates a new mock instance
func (*MockTermsIterable) EXPECT ¶ added in v0.9.0
func (m *MockTermsIterable) EXPECT() *MockTermsIterableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTermsIterable) Terms ¶ added in v0.9.0
func (m *MockTermsIterable) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockTermsIterableMockRecorder ¶ added in v0.9.0
type MockTermsIterableMockRecorder struct {
// contains filtered or unexported fields
}
MockTermsIterableMockRecorder is the mock recorder for MockTermsIterable
func (*MockTermsIterableMockRecorder) Terms ¶ added in v0.9.0
func (mr *MockTermsIterableMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockTermsIterator ¶ added in v0.9.0
type MockTermsIterator struct {
// contains filtered or unexported fields
}
MockTermsIterator is a mock of TermsIterator interface
func NewMockTermsIterator ¶ added in v0.9.0
func NewMockTermsIterator(ctrl *gomock.Controller) *MockTermsIterator
NewMockTermsIterator creates a new mock instance
func (*MockTermsIterator) Close ¶ added in v0.9.0
func (m *MockTermsIterator) Close() error
Close mocks base method
func (*MockTermsIterator) Current ¶ added in v0.9.0
func (m *MockTermsIterator) Current() ([]byte, postings.List)
Current mocks base method
func (*MockTermsIterator) EXPECT ¶ added in v0.9.0
func (m *MockTermsIterator) EXPECT() *MockTermsIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTermsIterator) Err ¶ added in v0.9.0
func (m *MockTermsIterator) Err() error
Err mocks base method
func (*MockTermsIterator) Next ¶ added in v0.9.0
func (m *MockTermsIterator) Next() bool
Next mocks base method
type MockTermsIteratorMockRecorder ¶ added in v0.9.0
type MockTermsIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockTermsIteratorMockRecorder is the mock recorder for MockTermsIterator
func (*MockTermsIteratorMockRecorder) Close ¶ added in v0.9.0
func (mr *MockTermsIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockTermsIteratorMockRecorder) Current ¶ added in v0.9.0
func (mr *MockTermsIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockTermsIteratorMockRecorder) Err ¶ added in v0.9.0
func (mr *MockTermsIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockTermsIteratorMockRecorder) Next ¶ added in v0.9.0
func (mr *MockTermsIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
type MutableSegment ¶
type MutableSegment interface { Segment DocumentsBuilder // Offset returns the postings offset. Offset() postings.ID // Seal marks the Mutable Segment immutable. Seal() error // IsSealed returns true iff the segment is open and un-sealed. IsSealed() bool }
MutableSegment is a segment which can be updated.
type OrderedBytesIterator ¶ added in v0.4.1
type OrderedBytesIterator interface { // Next returns a bool indicating if there are any more elements. Next() bool // Current returns the current element. // NB: the element returned is only valid until the subsequent call to Next(). Current() []byte // Err returns any errors encountered during iteration. Err() error // Close releases any resources held by the iterator. Close() error }
OrderedBytesIterator iterates over a collection of []bytes in lexicographical order.
var EmptyOrderedBytesIterator OrderedBytesIterator = emptyBytesIter{}
EmptyOrderedBytesIterator is an empty OrderedBytesIterator.
type Segment ¶
type Segment interface { // FieldsIterable returns an iterable fields, for which is not // safe for concurrent use. For concurrent use call FieldsIterable // multiple times. FieldsIterable() FieldsIterable // TermsIterable returns an iterable terms, for which is not // safe for concurrent use. For concurrent use call TermsIterable // multiple times. TermsIterable() TermsIterable // Size returns the number of documents within the Segment. It returns // 0 if the Segment has been closed. Size() int64 // ContainsID returns a bool indicating if the Segment contains the provided ID. ContainsID(docID []byte) (bool, error) // ContainsField returns a bool indicating if the Segment contains the provided field. ContainsField(field []byte) (bool, error) // Reader returns a point-in-time accessor to search the segment. Reader() (index.Reader, error) // Close closes the segment and releases any internal resources. Close() error }
Segment is a sub-collection of documents within an index.
type SegmentsBuilder ¶ added in v0.5.0
type SegmentsBuilder interface { Builder // AddSegments adds segments to build from. AddSegments(segments []Segment) error }
SegmentsBuilder is a builder that is built from segments.
type TermsIterable ¶ added in v0.5.0
type TermsIterable interface { // Terms returns an iterator over the known terms values for the given // field, in order by name, it is not valid for reading after mutating the // builder by inserting more documents. Terms(field []byte) (TermsIterator, error) }
TermsIterable can iterate over segment terms, it is not by default concurrency safe.
type TermsIterator ¶ added in v0.4.1
type TermsIterator interface { // Next returns a bool indicating if there are any more elements. Next() bool // Current returns the current element. // NB: the element returned is only valid until the subsequent call to Next(). Current() (term []byte, postings postings.List) // Err returns any errors encountered during iteration. Err() error // Close releases any resources held by the iterator. Close() error }
TermsIterator iterates over all known terms for the provided field.
var EmptyTermsIterator TermsIterator = emptyTermsIter{}
EmptyTermsIterator is an empty EmptyTermsIterator.