Documentation ¶
Overview ¶
Package segment is a generated GoMock package.
Index ¶
- Variables
- type Builder
- type DocumentsBuilder
- type FieldsIterable
- type FieldsIterator
- 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 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 ¶
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 ¶
DocumentsBuilder is a builder is written documents to.
type FieldsIterable ¶
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 ¶
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 MockBuilder ¶
type MockBuilder struct {
// contains filtered or unexported fields
}
MockBuilder is a mock of Builder interface
func NewMockBuilder ¶
func NewMockBuilder(ctrl *gomock.Controller) *MockBuilder
NewMockBuilder creates a new mock instance
func (*MockBuilder) AllDocs ¶
func (m *MockBuilder) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockBuilder) EXPECT ¶
func (m *MockBuilder) EXPECT() *MockBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockBuilder) Fields ¶
func (m *MockBuilder) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockBuilder) Terms ¶
func (m *MockBuilder) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockBuilderMockRecorder ¶
type MockBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockBuilderMockRecorder is the mock recorder for MockBuilder
func (*MockBuilderMockRecorder) AllDocs ¶
func (mr *MockBuilderMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockBuilderMockRecorder) Docs ¶
func (mr *MockBuilderMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockBuilderMockRecorder) Fields ¶
func (mr *MockBuilderMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockBuilderMockRecorder) Reset ¶
func (mr *MockBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockBuilderMockRecorder) Terms ¶
func (mr *MockBuilderMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockDocumentsBuilder ¶
type MockDocumentsBuilder struct {
// contains filtered or unexported fields
}
MockDocumentsBuilder is a mock of DocumentsBuilder interface
func NewMockDocumentsBuilder ¶
func NewMockDocumentsBuilder(ctrl *gomock.Controller) *MockDocumentsBuilder
NewMockDocumentsBuilder creates a new mock instance
func (*MockDocumentsBuilder) AllDocs ¶
func (m *MockDocumentsBuilder) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockDocumentsBuilder) Docs ¶
func (m *MockDocumentsBuilder) Docs() []doc.Document
Docs mocks base method
func (*MockDocumentsBuilder) EXPECT ¶
func (m *MockDocumentsBuilder) EXPECT() *MockDocumentsBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDocumentsBuilder) Fields ¶
func (m *MockDocumentsBuilder) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockDocumentsBuilder) Insert ¶
func (m *MockDocumentsBuilder) Insert(d doc.Document) ([]byte, error)
Insert mocks base method
func (*MockDocumentsBuilder) InsertBatch ¶
func (m *MockDocumentsBuilder) InsertBatch(b index.Batch) error
InsertBatch mocks base method
func (*MockDocumentsBuilder) Reset ¶
func (m *MockDocumentsBuilder) Reset(offset postings.ID)
Reset mocks base method
func (*MockDocumentsBuilder) Terms ¶
func (m *MockDocumentsBuilder) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockDocumentsBuilderMockRecorder ¶
type MockDocumentsBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockDocumentsBuilderMockRecorder is the mock recorder for MockDocumentsBuilder
func (*MockDocumentsBuilderMockRecorder) AllDocs ¶
func (mr *MockDocumentsBuilderMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockDocumentsBuilderMockRecorder) Docs ¶
func (mr *MockDocumentsBuilderMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockDocumentsBuilderMockRecorder) Fields ¶
func (mr *MockDocumentsBuilderMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockDocumentsBuilderMockRecorder) Insert ¶
func (mr *MockDocumentsBuilderMockRecorder) Insert(d interface{}) *gomock.Call
Insert indicates an expected call of Insert
func (*MockDocumentsBuilderMockRecorder) InsertBatch ¶
func (mr *MockDocumentsBuilderMockRecorder) InsertBatch(b interface{}) *gomock.Call
InsertBatch indicates an expected call of InsertBatch
func (*MockDocumentsBuilderMockRecorder) Reset ¶
func (mr *MockDocumentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockDocumentsBuilderMockRecorder) Terms ¶
func (mr *MockDocumentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockFieldsIterable ¶
type MockFieldsIterable struct {
// contains filtered or unexported fields
}
MockFieldsIterable is a mock of FieldsIterable interface
func NewMockFieldsIterable ¶
func NewMockFieldsIterable(ctrl *gomock.Controller) *MockFieldsIterable
NewMockFieldsIterable creates a new mock instance
func (*MockFieldsIterable) EXPECT ¶
func (m *MockFieldsIterable) EXPECT() *MockFieldsIterableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockFieldsIterable) Fields ¶
func (m *MockFieldsIterable) Fields() (FieldsIterator, error)
Fields mocks base method
type MockFieldsIterableMockRecorder ¶
type MockFieldsIterableMockRecorder struct {
// contains filtered or unexported fields
}
MockFieldsIterableMockRecorder is the mock recorder for MockFieldsIterable
func (*MockFieldsIterableMockRecorder) Fields ¶
func (mr *MockFieldsIterableMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
type MockFieldsIterator ¶
type MockFieldsIterator struct {
// contains filtered or unexported fields
}
MockFieldsIterator is a mock of FieldsIterator interface
func NewMockFieldsIterator ¶
func NewMockFieldsIterator(ctrl *gomock.Controller) *MockFieldsIterator
NewMockFieldsIterator creates a new mock instance
func (*MockFieldsIterator) Close ¶
func (m *MockFieldsIterator) Close() error
Close mocks base method
func (*MockFieldsIterator) Current ¶
func (m *MockFieldsIterator) Current() []byte
Current mocks base method
func (*MockFieldsIterator) EXPECT ¶
func (m *MockFieldsIterator) EXPECT() *MockFieldsIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockFieldsIteratorMockRecorder ¶
type MockFieldsIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockFieldsIteratorMockRecorder is the mock recorder for MockFieldsIterator
func (*MockFieldsIteratorMockRecorder) Close ¶
func (mr *MockFieldsIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockFieldsIteratorMockRecorder) Current ¶
func (mr *MockFieldsIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockFieldsIteratorMockRecorder) Err ¶
func (mr *MockFieldsIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockFieldsIteratorMockRecorder) Next ¶
func (mr *MockFieldsIteratorMockRecorder) Next() *gomock.Call
Next indicates an expected call of Next
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (mr *MockMutableSegmentMockRecorder) TermsIterable() *gomock.Call
TermsIterable indicates an expected call of TermsIterable
type MockOrderedBytesIterator ¶
type MockOrderedBytesIterator struct {
// contains filtered or unexported fields
}
MockOrderedBytesIterator is a mock of OrderedBytesIterator interface
func NewMockOrderedBytesIterator ¶
func NewMockOrderedBytesIterator(ctrl *gomock.Controller) *MockOrderedBytesIterator
NewMockOrderedBytesIterator creates a new mock instance
func (*MockOrderedBytesIterator) Close ¶
func (m *MockOrderedBytesIterator) Close() error
Close mocks base method
func (*MockOrderedBytesIterator) Current ¶
func (m *MockOrderedBytesIterator) Current() []byte
Current mocks base method
func (*MockOrderedBytesIterator) EXPECT ¶
func (m *MockOrderedBytesIterator) EXPECT() *MockOrderedBytesIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockOrderedBytesIterator) Err ¶
func (m *MockOrderedBytesIterator) Err() error
Err mocks base method
func (*MockOrderedBytesIterator) Next ¶
func (m *MockOrderedBytesIterator) Next() bool
Next mocks base method
type MockOrderedBytesIteratorMockRecorder ¶
type MockOrderedBytesIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockOrderedBytesIteratorMockRecorder is the mock recorder for MockOrderedBytesIterator
func (*MockOrderedBytesIteratorMockRecorder) Close ¶
func (mr *MockOrderedBytesIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockOrderedBytesIteratorMockRecorder) Current ¶
func (mr *MockOrderedBytesIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockOrderedBytesIteratorMockRecorder) Err ¶
func (mr *MockOrderedBytesIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockOrderedBytesIteratorMockRecorder) Next ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (mr *MockSegmentMockRecorder) TermsIterable() *gomock.Call
TermsIterable indicates an expected call of TermsIterable
type MockSegmentsBuilder ¶
type MockSegmentsBuilder struct {
// contains filtered or unexported fields
}
MockSegmentsBuilder is a mock of SegmentsBuilder interface
func NewMockSegmentsBuilder ¶
func NewMockSegmentsBuilder(ctrl *gomock.Controller) *MockSegmentsBuilder
NewMockSegmentsBuilder creates a new mock instance
func (*MockSegmentsBuilder) AddSegments ¶
func (m *MockSegmentsBuilder) AddSegments(segments []Segment) error
AddSegments mocks base method
func (*MockSegmentsBuilder) AllDocs ¶
func (m *MockSegmentsBuilder) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockSegmentsBuilder) Docs ¶
func (m *MockSegmentsBuilder) Docs() []doc.Document
Docs mocks base method
func (*MockSegmentsBuilder) EXPECT ¶
func (m *MockSegmentsBuilder) EXPECT() *MockSegmentsBuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockSegmentsBuilder) Fields ¶
func (m *MockSegmentsBuilder) Fields() (FieldsIterator, error)
Fields mocks base method
func (*MockSegmentsBuilder) Reset ¶
func (m *MockSegmentsBuilder) Reset(offset postings.ID)
Reset mocks base method
func (*MockSegmentsBuilder) Terms ¶
func (m *MockSegmentsBuilder) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockSegmentsBuilderMockRecorder ¶
type MockSegmentsBuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockSegmentsBuilderMockRecorder is the mock recorder for MockSegmentsBuilder
func (*MockSegmentsBuilderMockRecorder) AddSegments ¶
func (mr *MockSegmentsBuilderMockRecorder) AddSegments(segments interface{}) *gomock.Call
AddSegments indicates an expected call of AddSegments
func (*MockSegmentsBuilderMockRecorder) AllDocs ¶
func (mr *MockSegmentsBuilderMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockSegmentsBuilderMockRecorder) Docs ¶
func (mr *MockSegmentsBuilderMockRecorder) Docs() *gomock.Call
Docs indicates an expected call of Docs
func (*MockSegmentsBuilderMockRecorder) Fields ¶
func (mr *MockSegmentsBuilderMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockSegmentsBuilderMockRecorder) Reset ¶
func (mr *MockSegmentsBuilderMockRecorder) Reset(offset interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockSegmentsBuilderMockRecorder) Terms ¶
func (mr *MockSegmentsBuilderMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockTermsIterable ¶
type MockTermsIterable struct {
// contains filtered or unexported fields
}
MockTermsIterable is a mock of TermsIterable interface
func NewMockTermsIterable ¶
func NewMockTermsIterable(ctrl *gomock.Controller) *MockTermsIterable
NewMockTermsIterable creates a new mock instance
func (*MockTermsIterable) EXPECT ¶
func (m *MockTermsIterable) EXPECT() *MockTermsIterableMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockTermsIterable) Terms ¶
func (m *MockTermsIterable) Terms(field []byte) (TermsIterator, error)
Terms mocks base method
type MockTermsIterableMockRecorder ¶
type MockTermsIterableMockRecorder struct {
// contains filtered or unexported fields
}
MockTermsIterableMockRecorder is the mock recorder for MockTermsIterable
func (*MockTermsIterableMockRecorder) Terms ¶
func (mr *MockTermsIterableMockRecorder) Terms(field interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockTermsIterator ¶
type MockTermsIterator struct {
// contains filtered or unexported fields
}
MockTermsIterator is a mock of TermsIterator interface
func NewMockTermsIterator ¶
func NewMockTermsIterator(ctrl *gomock.Controller) *MockTermsIterator
NewMockTermsIterator creates a new mock instance
func (*MockTermsIterator) Current ¶
func (m *MockTermsIterator) Current() ([]byte, postings.List)
Current mocks base method
func (*MockTermsIterator) EXPECT ¶
func (m *MockTermsIterator) EXPECT() *MockTermsIteratorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockTermsIteratorMockRecorder ¶
type MockTermsIteratorMockRecorder struct {
// contains filtered or unexported fields
}
MockTermsIteratorMockRecorder is the mock recorder for MockTermsIterator
func (*MockTermsIteratorMockRecorder) Close ¶
func (mr *MockTermsIteratorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockTermsIteratorMockRecorder) Current ¶
func (mr *MockTermsIteratorMockRecorder) Current() *gomock.Call
Current indicates an expected call of Current
func (*MockTermsIteratorMockRecorder) Err ¶
func (mr *MockTermsIteratorMockRecorder) Err() *gomock.Call
Err indicates an expected call of Err
func (*MockTermsIteratorMockRecorder) Next ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.