Documentation ¶
Overview ¶
Package fs is a generated GoMock package.
Index ¶
- Constants
- type MockSegment
- func (m *MockSegment) AllDocs() (index.IDDocIterator, error)
- func (m *MockSegment) Close() error
- func (m *MockSegment) ContainsID(arg0 []byte) (bool, error)
- func (m *MockSegment) Doc(arg0 postings.ID) (doc.Document, error)
- func (m *MockSegment) Docs(arg0 postings.List) (doc.Iterator, error)
- func (m *MockSegment) EXPECT() *MockSegmentMockRecorder
- func (m *MockSegment) Fields() ([][]byte, error)
- func (m *MockSegment) MatchAll() (postings.MutableList, error)
- func (m *MockSegment) MatchRegexp(arg0, arg1 []byte, arg2 *regexp.Regexp) (postings.List, error)
- func (m *MockSegment) MatchTerm(arg0, arg1 []byte) (postings.List, error)
- func (m *MockSegment) Reader() (index.Reader, error)
- func (m *MockSegment) Size() int64
- func (m *MockSegment) Terms(arg0 []byte) ([][]byte, error)
- type MockSegmentMockRecorder
- func (mr *MockSegmentMockRecorder) AllDocs() *gomock.Call
- func (mr *MockSegmentMockRecorder) Close() *gomock.Call
- func (mr *MockSegmentMockRecorder) ContainsID(arg0 interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) Doc(arg0 interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) Docs(arg0 interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) Fields() *gomock.Call
- func (mr *MockSegmentMockRecorder) MatchAll() *gomock.Call
- func (mr *MockSegmentMockRecorder) MatchRegexp(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) MatchTerm(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockSegmentMockRecorder) Reader() *gomock.Call
- func (mr *MockSegmentMockRecorder) Size() *gomock.Call
- func (mr *MockSegmentMockRecorder) Terms(arg0 interface{}) *gomock.Call
- type MockWriter
- func (m *MockWriter) EXPECT() *MockWriterMockRecorder
- func (m *MockWriter) MajorVersion() int
- func (m *MockWriter) Metadata() []byte
- func (m *MockWriter) MinorVersion() int
- func (m *MockWriter) Reset(arg0 segment.MutableSegment) error
- func (m *MockWriter) WriteDocumentsData(arg0 io.Writer) error
- func (m *MockWriter) WriteDocumentsIndex(arg0 io.Writer) error
- func (m *MockWriter) WriteFSTFields(arg0 io.Writer) error
- func (m *MockWriter) WriteFSTTerms(arg0 io.Writer) error
- func (m *MockWriter) WritePostingsOffsets(arg0 io.Writer) error
- type MockWriterMockRecorder
- func (mr *MockWriterMockRecorder) MajorVersion() *gomock.Call
- func (mr *MockWriterMockRecorder) Metadata() *gomock.Call
- func (mr *MockWriterMockRecorder) MinorVersion() *gomock.Call
- func (mr *MockWriterMockRecorder) Reset(arg0 interface{}) *gomock.Call
- func (mr *MockWriterMockRecorder) WriteDocumentsData(arg0 interface{}) *gomock.Call
- func (mr *MockWriterMockRecorder) WriteDocumentsIndex(arg0 interface{}) *gomock.Call
- func (mr *MockWriterMockRecorder) WriteFSTFields(arg0 interface{}) *gomock.Call
- func (mr *MockWriterMockRecorder) WriteFSTTerms(arg0 interface{}) *gomock.Call
- func (mr *MockWriterMockRecorder) WritePostingsOffsets(arg0 interface{}) *gomock.Call
- type NewSegmentOpts
- type Segment
- type SegmentData
- type Writer
Constants ¶
const ( // MajorVersion is the currently supported MajorVersion. MajorVersion = 1 // MinorVersion is the current MinorVersion. MinorVersion = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) AllDocs ¶
func (m *MockSegment) AllDocs() (index.IDDocIterator, error)
AllDocs mocks base method
func (*MockSegment) ContainsID ¶
func (m *MockSegment) ContainsID(arg0 []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) Fields ¶
func (m *MockSegment) Fields() ([][]byte, error)
Fields mocks base method
func (*MockSegment) MatchAll ¶
func (m *MockSegment) MatchAll() (postings.MutableList, error)
MatchAll mocks base method
func (*MockSegment) MatchRegexp ¶
MatchRegexp mocks base method
func (*MockSegment) MatchTerm ¶
func (m *MockSegment) MatchTerm(arg0, arg1 []byte) (postings.List, error)
MatchTerm mocks base method
type MockSegmentMockRecorder ¶
type MockSegmentMockRecorder struct {
// contains filtered or unexported fields
}
MockSegmentMockRecorder is the mock recorder for MockSegment
func (*MockSegmentMockRecorder) AllDocs ¶
func (mr *MockSegmentMockRecorder) AllDocs() *gomock.Call
AllDocs indicates an expected call of AllDocs
func (*MockSegmentMockRecorder) Close ¶
func (mr *MockSegmentMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockSegmentMockRecorder) ContainsID ¶
func (mr *MockSegmentMockRecorder) ContainsID(arg0 interface{}) *gomock.Call
ContainsID indicates an expected call of ContainsID
func (*MockSegmentMockRecorder) Doc ¶
func (mr *MockSegmentMockRecorder) Doc(arg0 interface{}) *gomock.Call
Doc indicates an expected call of Doc
func (*MockSegmentMockRecorder) Docs ¶
func (mr *MockSegmentMockRecorder) Docs(arg0 interface{}) *gomock.Call
Docs indicates an expected call of Docs
func (*MockSegmentMockRecorder) Fields ¶
func (mr *MockSegmentMockRecorder) Fields() *gomock.Call
Fields indicates an expected call of Fields
func (*MockSegmentMockRecorder) MatchAll ¶
func (mr *MockSegmentMockRecorder) MatchAll() *gomock.Call
MatchAll indicates an expected call of MatchAll
func (*MockSegmentMockRecorder) MatchRegexp ¶
func (mr *MockSegmentMockRecorder) MatchRegexp(arg0, arg1, arg2 interface{}) *gomock.Call
MatchRegexp indicates an expected call of MatchRegexp
func (*MockSegmentMockRecorder) MatchTerm ¶
func (mr *MockSegmentMockRecorder) MatchTerm(arg0, arg1 interface{}) *gomock.Call
MatchTerm indicates an expected call of MatchTerm
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) Terms ¶
func (mr *MockSegmentMockRecorder) Terms(arg0 interface{}) *gomock.Call
Terms indicates an expected call of Terms
type MockWriter ¶
type MockWriter struct {
// contains filtered or unexported fields
}
MockWriter is a mock of Writer interface
func NewMockWriter ¶
func NewMockWriter(ctrl *gomock.Controller) *MockWriter
NewMockWriter creates a new mock instance
func (*MockWriter) EXPECT ¶
func (m *MockWriter) EXPECT() *MockWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockWriter) MajorVersion ¶
func (m *MockWriter) MajorVersion() int
MajorVersion mocks base method
func (*MockWriter) MinorVersion ¶
func (m *MockWriter) MinorVersion() int
MinorVersion mocks base method
func (*MockWriter) Reset ¶
func (m *MockWriter) Reset(arg0 segment.MutableSegment) error
Reset mocks base method
func (*MockWriter) WriteDocumentsData ¶
func (m *MockWriter) WriteDocumentsData(arg0 io.Writer) error
WriteDocumentsData mocks base method
func (*MockWriter) WriteDocumentsIndex ¶
func (m *MockWriter) WriteDocumentsIndex(arg0 io.Writer) error
WriteDocumentsIndex mocks base method
func (*MockWriter) WriteFSTFields ¶
func (m *MockWriter) WriteFSTFields(arg0 io.Writer) error
WriteFSTFields mocks base method
func (*MockWriter) WriteFSTTerms ¶
func (m *MockWriter) WriteFSTTerms(arg0 io.Writer) error
WriteFSTTerms mocks base method
func (*MockWriter) WritePostingsOffsets ¶
func (m *MockWriter) WritePostingsOffsets(arg0 io.Writer) error
WritePostingsOffsets mocks base method
type MockWriterMockRecorder ¶
type MockWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockWriterMockRecorder is the mock recorder for MockWriter
func (*MockWriterMockRecorder) MajorVersion ¶
func (mr *MockWriterMockRecorder) MajorVersion() *gomock.Call
MajorVersion indicates an expected call of MajorVersion
func (*MockWriterMockRecorder) Metadata ¶
func (mr *MockWriterMockRecorder) Metadata() *gomock.Call
Metadata indicates an expected call of Metadata
func (*MockWriterMockRecorder) MinorVersion ¶
func (mr *MockWriterMockRecorder) MinorVersion() *gomock.Call
MinorVersion indicates an expected call of MinorVersion
func (*MockWriterMockRecorder) Reset ¶
func (mr *MockWriterMockRecorder) Reset(arg0 interface{}) *gomock.Call
Reset indicates an expected call of Reset
func (*MockWriterMockRecorder) WriteDocumentsData ¶
func (mr *MockWriterMockRecorder) WriteDocumentsData(arg0 interface{}) *gomock.Call
WriteDocumentsData indicates an expected call of WriteDocumentsData
func (*MockWriterMockRecorder) WriteDocumentsIndex ¶
func (mr *MockWriterMockRecorder) WriteDocumentsIndex(arg0 interface{}) *gomock.Call
WriteDocumentsIndex indicates an expected call of WriteDocumentsIndex
func (*MockWriterMockRecorder) WriteFSTFields ¶
func (mr *MockWriterMockRecorder) WriteFSTFields(arg0 interface{}) *gomock.Call
WriteFSTFields indicates an expected call of WriteFSTFields
func (*MockWriterMockRecorder) WriteFSTTerms ¶
func (mr *MockWriterMockRecorder) WriteFSTTerms(arg0 interface{}) *gomock.Call
WriteFSTTerms indicates an expected call of WriteFSTTerms
func (*MockWriterMockRecorder) WritePostingsOffsets ¶
func (mr *MockWriterMockRecorder) WritePostingsOffsets(arg0 interface{}) *gomock.Call
WritePostingsOffsets indicates an expected call of WritePostingsOffsets
type NewSegmentOpts ¶
NewSegmentOpts represent the collection of knobs used by the Segment.
type Segment ¶
Segment represents a FST segment.
func NewSegment ¶
func NewSegment(data SegmentData, opts NewSegmentOpts) (Segment, error)
NewSegment returns a new Segment backed by the provided options. NB(prateek): this method only assumes ownership of the data if it returns a nil error, otherwise, the user is expected to handle the lifecycle of the input.
type SegmentData ¶
type SegmentData struct { MajorVersion int MinorVersion int Metadata []byte DocsData []byte DocsIdxData []byte PostingsData []byte FSTTermsData []byte FSTFieldsData []byte Closer io.Closer }
SegmentData represent the collection of required parameters to construct a Segment.
func (SegmentData) Validate ¶
func (sd SegmentData) Validate() error
Validate validates the provided segment data, returning an error if it's not.
type Writer ¶
type Writer interface { // Reset sets the Writer to persist the provide segment. // NB(prateek): the provided segment must be a Sealed Mutable segment. Reset(s sgmt.MutableSegment) error // MajorVersion is the major version for the writer. MajorVersion() int // MinorVersion is the minor version for the writer. MinorVersion() int // Metadata returns metadata about the writer. Metadata() []byte // WriteDocumentsData writes out the documents data to the provided writer. WriteDocumentsData(w io.Writer) error // WriteDocumentsIndex writes out the documents index to the provided writer. // NB(prateek): this must be called after WriteDocumentsData(). WriteDocumentsIndex(w io.Writer) error // WritePostingsOffsets writes out the postings offset file to the provided // writer. WritePostingsOffsets(w io.Writer) error // WriteFSTTerms writes out the FSTTerms file using the provided writer. // NB(prateek): this must be called after WritePostingsOffsets(). WriteFSTTerms(w io.Writer) error // WriteFSTFields writes out the FSTFields file using the provided writer. // NB(prateek): this must be called after WriteFSTTerm(). WriteFSTFields(w io.Writer) error }
Writer writes out a FST segment from the provided elements.