Documentation ¶
Overview ¶
Package persist is a generated GoMock package.
Index ¶
- type DataCloser
- type DataFlush
- type DataFn
- type DataPrepareOptions
- type DataPrepareSnapshotOptions
- type DataPrepareVolumeOptions
- type FileSetContentType
- type FileSetType
- type IndexCloser
- type IndexFlush
- type IndexFn
- type IndexPrepareOptions
- type Manager
- type MockDataFlush
- type MockDataFlushMockRecorder
- type MockIndexFlush
- type MockIndexFlushMockRecorder
- type MockManager
- type MockManagerMockRecorder
- type PreparedDataPersist
- type PreparedIndexPersist
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataCloser ¶
type DataCloser func() error
DataCloser is a function that performs cleanup after persisting the data blocks for a (shard, blockStart) combination.
type DataFlush ¶
type DataFlush interface { // Prepare prepares writing data for a given (shard, blockStart) combination, // returning a PreparedDataPersist object and any error encountered during // preparation if any. PrepareData(opts DataPrepareOptions) (PreparedDataPersist, error) // DoneData marks the data flush as complete. DoneData() error }
DataFlush is a persist flush cycle, each shard and block start permutation needs to explicility be prepared.
type DataPrepareOptions ¶
type DataPrepareOptions struct { NamespaceMetadata namespace.Metadata BlockStart time.Time Shard uint32 FileSetType FileSetType DeleteIfExists bool // Snapshot options are applicable to snapshots (index yes, data yes) Snapshot DataPrepareSnapshotOptions }
DataPrepareOptions is the options struct for the DataFlush's Prepare method. nolint: maligned
type DataPrepareSnapshotOptions ¶
DataPrepareSnapshotOptions is the options struct for the Prepare method that contains information specific to read/writing snapshot files.
type DataPrepareVolumeOptions ¶
type DataPrepareVolumeOptions struct {
VolumeIndex int
}
DataPrepareVolumeOptions is the options struct for the prepare method that contains information specific to read/writing filesets that have multiple volumes (such as snapshots and index file sets).
type FileSetContentType ¶
type FileSetContentType int
FileSetContentType is an enum that indicates what the contents of files a fileset contains
const ( // FileSetDataContentType indicates that the fileset files contents is time series data FileSetDataContentType FileSetContentType = iota // FileSetIndexContentType indicates that the fileset files contain time series index metadata FileSetIndexContentType )
func (FileSetContentType) String ¶
func (f FileSetContentType) String() string
type FileSetType ¶
type FileSetType int
FileSetType is an enum that indicates what type of files a fileset contains
const ( // FileSetFlushType indicates that the fileset files contain a complete flush FileSetFlushType FileSetType = iota // FileSetSnapshotType indicates that the fileset files contain a snapshot FileSetSnapshotType )
func (FileSetType) String ¶
func (f FileSetType) String() string
type IndexCloser ¶
IndexCloser is a function that performs cleanup after persisting the index data block for a (namespace, blockStart) combination and returns the corresponding immutable Segment.
type IndexFlush ¶
type IndexFlush interface { // Prepare prepares writing data for a given ns/blockStart, returning a // PreparedIndexPersist object and any error encountered during // preparation if any. PrepareIndex(opts IndexPrepareOptions) (PreparedIndexPersist, error) // DoneIndex marks the index flush as complete. DoneIndex() error }
IndexFlush is a persist flush cycle, each namespace, block combination needs to explicility be prepared.
type IndexFn ¶
type IndexFn func(segment.MutableSegment) error
IndexFn is a function that persists a m3ninx MutableSegment.
type IndexPrepareOptions ¶
type IndexPrepareOptions struct { NamespaceMetadata namespace.Metadata BlockStart time.Time FileSetType FileSetType Shards map[uint32]struct{} }
IndexPrepareOptions is the options struct for the IndexFlush's Prepare method. nolint: maligned
type Manager ¶
type Manager interface { // StartDataPersist begins a data flush for a set of shards. StartDataPersist() (DataFlush, error) // StartIndexPersist begins a flush for index data. StartIndexPersist() (IndexFlush, error) }
Manager manages the internals of persisting data onto storage layer.
type MockDataFlush ¶
type MockDataFlush struct {
// contains filtered or unexported fields
}
MockDataFlush is a mock of DataFlush interface
func NewMockDataFlush ¶
func NewMockDataFlush(ctrl *gomock.Controller) *MockDataFlush
NewMockDataFlush creates a new mock instance
func (*MockDataFlush) DoneData ¶
func (m *MockDataFlush) DoneData() error
DoneData mocks base method
func (*MockDataFlush) EXPECT ¶
func (m *MockDataFlush) EXPECT() *MockDataFlushMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDataFlush) PrepareData ¶
func (m *MockDataFlush) PrepareData(opts DataPrepareOptions) (PreparedDataPersist, error)
PrepareData mocks base method
type MockDataFlushMockRecorder ¶
type MockDataFlushMockRecorder struct {
// contains filtered or unexported fields
}
MockDataFlushMockRecorder is the mock recorder for MockDataFlush
func (*MockDataFlushMockRecorder) DoneData ¶
func (mr *MockDataFlushMockRecorder) DoneData() *gomock.Call
DoneData indicates an expected call of DoneData
func (*MockDataFlushMockRecorder) PrepareData ¶
func (mr *MockDataFlushMockRecorder) PrepareData(opts interface{}) *gomock.Call
PrepareData indicates an expected call of PrepareData
type MockIndexFlush ¶
type MockIndexFlush struct {
// contains filtered or unexported fields
}
MockIndexFlush is a mock of IndexFlush interface
func NewMockIndexFlush ¶
func NewMockIndexFlush(ctrl *gomock.Controller) *MockIndexFlush
NewMockIndexFlush creates a new mock instance
func (*MockIndexFlush) DoneIndex ¶
func (m *MockIndexFlush) DoneIndex() error
DoneIndex mocks base method
func (*MockIndexFlush) EXPECT ¶
func (m *MockIndexFlush) EXPECT() *MockIndexFlushMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockIndexFlush) PrepareIndex ¶
func (m *MockIndexFlush) PrepareIndex(opts IndexPrepareOptions) (PreparedIndexPersist, error)
PrepareIndex mocks base method
type MockIndexFlushMockRecorder ¶
type MockIndexFlushMockRecorder struct {
// contains filtered or unexported fields
}
MockIndexFlushMockRecorder is the mock recorder for MockIndexFlush
func (*MockIndexFlushMockRecorder) DoneIndex ¶
func (mr *MockIndexFlushMockRecorder) DoneIndex() *gomock.Call
DoneIndex indicates an expected call of DoneIndex
func (*MockIndexFlushMockRecorder) PrepareIndex ¶
func (mr *MockIndexFlushMockRecorder) PrepareIndex(opts interface{}) *gomock.Call
PrepareIndex indicates an expected call of PrepareIndex
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
MockManager is a mock of Manager interface
func NewMockManager ¶
func NewMockManager(ctrl *gomock.Controller) *MockManager
NewMockManager creates a new mock instance
func (*MockManager) EXPECT ¶
func (m *MockManager) EXPECT() *MockManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockManager) StartDataPersist ¶
func (m *MockManager) StartDataPersist() (DataFlush, error)
StartDataPersist mocks base method
func (*MockManager) StartIndexPersist ¶
func (m *MockManager) StartIndexPersist() (IndexFlush, error)
StartIndexPersist mocks base method
type MockManagerMockRecorder ¶
type MockManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockManagerMockRecorder is the mock recorder for MockManager
func (*MockManagerMockRecorder) StartDataPersist ¶
func (mr *MockManagerMockRecorder) StartDataPersist() *gomock.Call
StartDataPersist indicates an expected call of StartDataPersist
func (*MockManagerMockRecorder) StartIndexPersist ¶
func (mr *MockManagerMockRecorder) StartIndexPersist() *gomock.Call
StartIndexPersist indicates an expected call of StartIndexPersist
type PreparedDataPersist ¶
type PreparedDataPersist struct { Persist DataFn Close DataCloser }
PreparedDataPersist is an object that wraps holds a persist function and a closer.
type PreparedIndexPersist ¶
type PreparedIndexPersist struct { Persist IndexFn Close IndexCloser }
PreparedIndexPersist is an object that wraps holds a persist function and a closer.