segment

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 24

Documentation

Overview

Package segment is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
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 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) Close

func (m *MockMutableSegment) Close() error

Close mocks base method

func (*MockMutableSegment) ContainsID

func (m *MockMutableSegment) ContainsID(arg0 []byte) (bool, error)

ContainsID mocks base method

func (*MockMutableSegment) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockMutableSegment) Fields

func (m *MockMutableSegment) Fields() ([][]byte, error)

Fields mocks base method

func (*MockMutableSegment) Insert

func (m *MockMutableSegment) Insert(arg0 doc.Document) ([]byte, error)

Insert mocks base method

func (*MockMutableSegment) InsertBatch

func (m *MockMutableSegment) InsertBatch(arg0 index.Batch) error

InsertBatch mocks base method

func (*MockMutableSegment) IsSealed

func (m *MockMutableSegment) IsSealed() bool

IsSealed mocks base method

func (*MockMutableSegment) Reader

func (m *MockMutableSegment) Reader() (index.Reader, error)

Reader mocks base method

func (*MockMutableSegment) Seal

func (m *MockMutableSegment) Seal() (Segment, error)

Seal mocks base method

func (*MockMutableSegment) Size

func (m *MockMutableSegment) Size() int64

Size mocks base method

func (*MockMutableSegment) Terms

func (m *MockMutableSegment) Terms(arg0 []byte) ([][]byte, error)

Terms mocks base method

type MockMutableSegmentMockRecorder

type MockMutableSegmentMockRecorder struct {
	// contains filtered or unexported fields
}

MockMutableSegmentMockRecorder is the mock recorder for MockMutableSegment

func (*MockMutableSegmentMockRecorder) Close

Close indicates an expected call of Close

func (*MockMutableSegmentMockRecorder) ContainsID

func (mr *MockMutableSegmentMockRecorder) ContainsID(arg0 interface{}) *gomock.Call

ContainsID indicates an expected call of ContainsID

func (*MockMutableSegmentMockRecorder) Fields

Fields indicates an expected call of Fields

func (*MockMutableSegmentMockRecorder) Insert

func (mr *MockMutableSegmentMockRecorder) Insert(arg0 interface{}) *gomock.Call

Insert indicates an expected call of Insert

func (*MockMutableSegmentMockRecorder) InsertBatch

func (mr *MockMutableSegmentMockRecorder) InsertBatch(arg0 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) Reader

Reader indicates an expected call of Reader

func (*MockMutableSegmentMockRecorder) Seal

Seal indicates an expected call of Seal

func (*MockMutableSegmentMockRecorder) Size

Size indicates an expected call of Size

func (*MockMutableSegmentMockRecorder) Terms

func (mr *MockMutableSegmentMockRecorder) Terms(arg0 interface{}) *gomock.Call

Terms indicates an expected call of Terms

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) Close

func (m *MockSegment) Close() error

Close 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) Reader

func (m *MockSegment) Reader() (index.Reader, error)

Reader mocks base method

func (*MockSegment) Size

func (m *MockSegment) Size() int64

Size mocks base method

func (*MockSegment) Terms

func (m *MockSegment) Terms(arg0 []byte) ([][]byte, error)

Terms 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) ContainsID

func (mr *MockSegmentMockRecorder) ContainsID(arg0 interface{}) *gomock.Call

ContainsID indicates an expected call of ContainsID

func (*MockSegmentMockRecorder) Fields

func (mr *MockSegmentMockRecorder) Fields() *gomock.Call

Fields indicates an expected call of Fields

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 MutableSegment

type MutableSegment interface {
	Segment
	index.Writer

	// Seal marks the Mutable Segment immutable.
	Seal() (Segment, error)

	// IsSealed returns true iff the segment is open and un-sealed.
	IsSealed() bool
}

MutableSegment is a segment which can be updated.

type Segment

type Segment interface {
	// 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)

	// Reader returns a point-in-time accessor to search the segment.
	Reader() (index.Reader, error)

	// Fields returns the list of known fields.
	Fields() ([][]byte, error)

	// Terms returns the list of known terms values for the given field.
	Terms(field []byte) ([][]byte, error)

	// Close closes the segment and releases any internal resources.
	Close() error
}

Segment is a sub-collection of documents within an index.

Directories

Path Synopsis
fs
Package fs is a generated GoMock package.
Package fs is a generated GoMock package.
Package mem is a generated GoMock package.
Package mem is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL