mem

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2019 License: Apache-2.0 Imports: 20 Imported by: 6

Documentation

Overview

Package mem is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(target sgmt.MutableSegment, srcs ...sgmt.MutableSegment) error

Merge merges the segments `srcs` into `target`.

func NewSegment

func NewSegment(offset postings.ID, opts Options) (sgmt.MutableSegment, error)

NewSegment returns a new in-memory mutable segment. It will start assigning postings IDs at the provided offset.

Types

type MockReadableSegment

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

MockReadableSegment is a mock of ReadableSegment interface

func NewMockReadableSegment

func NewMockReadableSegment(ctrl *gomock.Controller) *MockReadableSegment

NewMockReadableSegment creates a new mock instance

func (*MockReadableSegment) EXPECT

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

type MockReadableSegmentMockRecorder

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

MockReadableSegmentMockRecorder is the mock recorder for MockReadableSegment

type Options

type Options interface {
	// SetInstrumentOptions sets the instrument options.
	SetInstrumentOptions(value instrument.Options) Options

	// InstrumentOptions returns the instrument options.
	InstrumentOptions() instrument.Options

	// SetBytesSliceArrayPool sets the bytes slice array pool.
	SetBytesSliceArrayPool(value bytes.SliceArrayPool) Options

	// BytesSliceArrayPool returns the bytes slice array pool.
	BytesSliceArrayPool() bytes.SliceArrayPool

	// SetPostingsListPool sets the postings list pool.
	SetPostingsListPool(value postings.Pool) Options

	// PostingsListPool returns the postings list pool.
	PostingsListPool() postings.Pool

	// SetInitialCapacity sets the initial capacity.
	SetInitialCapacity(value int) Options

	// InitialCapacity returns the initial capacity.
	InitialCapacity() int

	// SetNewUUIDFn sets the function used to generate new UUIDs.
	SetNewUUIDFn(value util.NewUUIDFn) Options

	// NewUUIDFn returns the function used to generate new UUIDs.
	NewUUIDFn() util.NewUUIDFn
}

Options is a collection of knobs for an in-memory segment.

func NewOptions

func NewOptions() Options

NewOptions returns new options.

type ReadableSegment

type ReadableSegment interface {
	// contains filtered or unexported methods
}

ReadableSegment is an internal interface for reading from a segment.

NB(jeromefroe): Currently mockgen requires that interfaces with embedded interfaces be generated with reflection mode, but private interfaces can only be generated with file mode so we can't mock this interface if its private. Once mockgen supports mocking private interfaces which contain embedded interfaces we can make this interface private.

Jump to

Keyboard shortcuts

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