Documentation ¶
Index ¶
- func NewStorageSerializer(allocator allocator.Interface, metacache metacache.MetaCache, ...) (*storageV1Serializer, error)
- type MetaWriter
- type MockMetaWriter
- type MockMetaWriter_DropChannel_Call
- func (_c *MockMetaWriter_DropChannel_Call) Return(_a0 error) *MockMetaWriter_DropChannel_Call
- func (_c *MockMetaWriter_DropChannel_Call) Run(run func(_a0 context.Context, _a1 string)) *MockMetaWriter_DropChannel_Call
- func (_c *MockMetaWriter_DropChannel_Call) RunAndReturn(run func(context.Context, string) error) *MockMetaWriter_DropChannel_Call
- type MockMetaWriter_Expecter
- type MockMetaWriter_UpdateSync_Call
- func (_c *MockMetaWriter_UpdateSync_Call) Return(_a0 error) *MockMetaWriter_UpdateSync_Call
- func (_c *MockMetaWriter_UpdateSync_Call) Run(run func(_a0 context.Context, _a1 *SyncTask)) *MockMetaWriter_UpdateSync_Call
- func (_c *MockMetaWriter_UpdateSync_Call) RunAndReturn(run func(context.Context, *SyncTask) error) *MockMetaWriter_UpdateSync_Call
- type MockSerializer
- type MockSerializer_EncodeBuffer_Call
- func (_c *MockSerializer_EncodeBuffer_Call) Return(_a0 Task, _a1 error) *MockSerializer_EncodeBuffer_Call
- func (_c *MockSerializer_EncodeBuffer_Call) Run(run func(ctx context.Context, pack *SyncPack)) *MockSerializer_EncodeBuffer_Call
- func (_c *MockSerializer_EncodeBuffer_Call) RunAndReturn(run func(context.Context, *SyncPack) (Task, error)) *MockSerializer_EncodeBuffer_Call
- type MockSerializer_Expecter
- type MockSyncManager
- type MockSyncManager_Expecter
- type MockSyncManager_SyncData_Call
- func (_c *MockSyncManager_SyncData_Call) Return(_a0 *conc.Future[struct{}]) *MockSyncManager_SyncData_Call
- func (_c *MockSyncManager_SyncData_Call) Run(run func(ctx context.Context, task Task, callbacks ...func(error) error)) *MockSyncManager_SyncData_Call
- func (_c *MockSyncManager_SyncData_Call) RunAndReturn(run func(context.Context, Task, ...func(error) error) *conc.Future[struct{}]) *MockSyncManager_SyncData_Call
- type MockTask
- func (_m *MockTask) ChannelName() string
- func (_m *MockTask) Checkpoint() *msgpb.MsgPosition
- func (_m *MockTask) EXPECT() *MockTask_Expecter
- func (_m *MockTask) HandleError(_a0 error)
- func (_m *MockTask) Run(_a0 context.Context) error
- func (_m *MockTask) SegmentID() int64
- func (_m *MockTask) StartPosition() *msgpb.MsgPosition
- type MockTask_ChannelName_Call
- type MockTask_Checkpoint_Call
- type MockTask_Expecter
- func (_e *MockTask_Expecter) ChannelName() *MockTask_ChannelName_Call
- func (_e *MockTask_Expecter) Checkpoint() *MockTask_Checkpoint_Call
- func (_e *MockTask_Expecter) HandleError(_a0 interface{}) *MockTask_HandleError_Call
- func (_e *MockTask_Expecter) Run(_a0 interface{}) *MockTask_Run_Call
- func (_e *MockTask_Expecter) SegmentID() *MockTask_SegmentID_Call
- func (_e *MockTask_Expecter) StartPosition() *MockTask_StartPosition_Call
- type MockTask_HandleError_Call
- type MockTask_Run_Call
- type MockTask_SegmentID_Call
- type MockTask_StartPosition_Call
- type Serializer
- type SyncManager
- type SyncManagerOption
- type SyncMeta
- type SyncPack
- func (p *SyncPack) WithBatchSize(batchSize int64) *SyncPack
- func (p *SyncPack) WithChannelName(chanName string) *SyncPack
- func (p *SyncPack) WithCheckpoint(cp *msgpb.MsgPosition) *SyncPack
- func (p *SyncPack) WithCollectionID(collID int64) *SyncPack
- func (p *SyncPack) WithDeleteData(deltaData *storage.DeleteData) *SyncPack
- func (p *SyncPack) WithDrop() *SyncPack
- func (p *SyncPack) WithFlush() *SyncPack
- func (p *SyncPack) WithInsertData(insertData []*storage.InsertData) *SyncPack
- func (p *SyncPack) WithLevel(level datapb.SegmentLevel) *SyncPack
- func (p *SyncPack) WithPartitionID(partID int64) *SyncPack
- func (p *SyncPack) WithSegmentID(segID int64) *SyncPack
- func (p *SyncPack) WithStartPosition(start *msgpb.MsgPosition) *SyncPack
- func (p *SyncPack) WithTimeRange(from, to typeutil.Timestamp) *SyncPack
- type SyncTask
- func (t *SyncTask) Binlogs() (map[int64]*datapb.FieldBinlog, map[int64]*datapb.FieldBinlog, ...)
- func (t *SyncTask) ChannelName() string
- func (t *SyncTask) Checkpoint() *msgpb.MsgPosition
- func (t *SyncTask) HandleError(err error)
- func (t *SyncTask) Run(ctx context.Context) (err error)
- func (t *SyncTask) SegmentID() int64
- func (t *SyncTask) StartPosition() *msgpb.MsgPosition
- func (t *SyncTask) WithAllocator(allocator allocator.Interface) *SyncTask
- func (t *SyncTask) WithBatchSize(batchSize int64) *SyncTask
- func (t *SyncTask) WithChannelName(chanName string) *SyncTask
- func (t *SyncTask) WithCheckpoint(cp *msgpb.MsgPosition) *SyncTask
- func (t *SyncTask) WithChunkManager(cm storage.ChunkManager) *SyncTask
- func (t *SyncTask) WithCollectionID(collID int64) *SyncTask
- func (t *SyncTask) WithDrop() *SyncTask
- func (t *SyncTask) WithFailureCallback(callback func(error)) *SyncTask
- func (t *SyncTask) WithFlush() *SyncTask
- func (t *SyncTask) WithLevel(level datapb.SegmentLevel) *SyncTask
- func (t *SyncTask) WithMetaCache(metacache metacache.MetaCache) *SyncTask
- func (t *SyncTask) WithMetaWriter(metaWriter MetaWriter) *SyncTask
- func (t *SyncTask) WithPartitionID(partID int64) *SyncTask
- func (t *SyncTask) WithSchema(schema *schemapb.CollectionSchema) *SyncTask
- func (t *SyncTask) WithSegmentID(segID int64) *SyncTask
- func (t *SyncTask) WithStartPosition(start *msgpb.MsgPosition) *SyncTask
- func (t *SyncTask) WithTimeRange(from, to typeutil.Timestamp) *SyncTask
- func (t *SyncTask) WithWriteRetryOptions(opts ...retry.Option) *SyncTask
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStorageSerializer ¶
Types ¶
type MetaWriter ¶
type MetaWriter interface { UpdateSync(context.Context, *SyncTask) error DropChannel(context.Context, string) error }
MetaWriter is the interface for SyncManager to write segment sync meta.
func BrokerMetaWriter ¶
type MockMetaWriter ¶
MockMetaWriter is an autogenerated mock type for the MetaWriter type
func NewMockMetaWriter ¶
func NewMockMetaWriter(t interface { mock.TestingT Cleanup(func()) }) *MockMetaWriter
NewMockMetaWriter creates a new instance of MockMetaWriter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMetaWriter) DropChannel ¶
func (_m *MockMetaWriter) DropChannel(_a0 context.Context, _a1 string) error
DropChannel provides a mock function with given fields: _a0, _a1
func (*MockMetaWriter) EXPECT ¶
func (_m *MockMetaWriter) EXPECT() *MockMetaWriter_Expecter
func (*MockMetaWriter) UpdateSync ¶
func (_m *MockMetaWriter) UpdateSync(_a0 context.Context, _a1 *SyncTask) error
UpdateSync provides a mock function with given fields: _a0, _a1
type MockMetaWriter_DropChannel_Call ¶
MockMetaWriter_DropChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropChannel'
func (*MockMetaWriter_DropChannel_Call) Return ¶
func (_c *MockMetaWriter_DropChannel_Call) Return(_a0 error) *MockMetaWriter_DropChannel_Call
func (*MockMetaWriter_DropChannel_Call) Run ¶
func (_c *MockMetaWriter_DropChannel_Call) Run(run func(_a0 context.Context, _a1 string)) *MockMetaWriter_DropChannel_Call
func (*MockMetaWriter_DropChannel_Call) RunAndReturn ¶
func (_c *MockMetaWriter_DropChannel_Call) RunAndReturn(run func(context.Context, string) error) *MockMetaWriter_DropChannel_Call
type MockMetaWriter_Expecter ¶
type MockMetaWriter_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMetaWriter_Expecter) DropChannel ¶
func (_e *MockMetaWriter_Expecter) DropChannel(_a0 interface{}, _a1 interface{}) *MockMetaWriter_DropChannel_Call
DropChannel is a helper method to define mock.On call
- _a0 context.Context
- _a1 string
func (*MockMetaWriter_Expecter) UpdateSync ¶
func (_e *MockMetaWriter_Expecter) UpdateSync(_a0 interface{}, _a1 interface{}) *MockMetaWriter_UpdateSync_Call
UpdateSync is a helper method to define mock.On call
- _a0 context.Context
- _a1 *SyncTask
type MockMetaWriter_UpdateSync_Call ¶
MockMetaWriter_UpdateSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSync'
func (*MockMetaWriter_UpdateSync_Call) Return ¶
func (_c *MockMetaWriter_UpdateSync_Call) Return(_a0 error) *MockMetaWriter_UpdateSync_Call
func (*MockMetaWriter_UpdateSync_Call) Run ¶
func (_c *MockMetaWriter_UpdateSync_Call) Run(run func(_a0 context.Context, _a1 *SyncTask)) *MockMetaWriter_UpdateSync_Call
func (*MockMetaWriter_UpdateSync_Call) RunAndReturn ¶
func (_c *MockMetaWriter_UpdateSync_Call) RunAndReturn(run func(context.Context, *SyncTask) error) *MockMetaWriter_UpdateSync_Call
type MockSerializer ¶
MockSerializer is an autogenerated mock type for the Serializer type
func NewMockSerializer ¶
func NewMockSerializer(t interface { mock.TestingT Cleanup(func()) }) *MockSerializer
NewMockSerializer creates a new instance of MockSerializer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSerializer) EXPECT ¶
func (_m *MockSerializer) EXPECT() *MockSerializer_Expecter
func (*MockSerializer) EncodeBuffer ¶
EncodeBuffer provides a mock function with given fields: ctx, pack
type MockSerializer_EncodeBuffer_Call ¶
MockSerializer_EncodeBuffer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EncodeBuffer'
func (*MockSerializer_EncodeBuffer_Call) Return ¶
func (_c *MockSerializer_EncodeBuffer_Call) Return(_a0 Task, _a1 error) *MockSerializer_EncodeBuffer_Call
func (*MockSerializer_EncodeBuffer_Call) Run ¶
func (_c *MockSerializer_EncodeBuffer_Call) Run(run func(ctx context.Context, pack *SyncPack)) *MockSerializer_EncodeBuffer_Call
func (*MockSerializer_EncodeBuffer_Call) RunAndReturn ¶
func (_c *MockSerializer_EncodeBuffer_Call) RunAndReturn(run func(context.Context, *SyncPack) (Task, error)) *MockSerializer_EncodeBuffer_Call
type MockSerializer_Expecter ¶
type MockSerializer_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSerializer_Expecter) EncodeBuffer ¶
func (_e *MockSerializer_Expecter) EncodeBuffer(ctx interface{}, pack interface{}) *MockSerializer_EncodeBuffer_Call
EncodeBuffer is a helper method to define mock.On call
- ctx context.Context
- pack *SyncPack
type MockSyncManager ¶
MockSyncManager is an autogenerated mock type for the SyncManager type
func NewMockSyncManager ¶
func NewMockSyncManager(t interface { mock.TestingT Cleanup(func()) }) *MockSyncManager
NewMockSyncManager creates a new instance of MockSyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSyncManager) EXPECT ¶
func (_m *MockSyncManager) EXPECT() *MockSyncManager_Expecter
type MockSyncManager_Expecter ¶
type MockSyncManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSyncManager_Expecter) SyncData ¶
func (_e *MockSyncManager_Expecter) SyncData(ctx interface{}, task interface{}, callbacks ...interface{}) *MockSyncManager_SyncData_Call
SyncData is a helper method to define mock.On call
- ctx context.Context
- task Task
- callbacks ...func(error) error
type MockSyncManager_SyncData_Call ¶
MockSyncManager_SyncData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncData'
func (*MockSyncManager_SyncData_Call) Return ¶
func (_c *MockSyncManager_SyncData_Call) Return(_a0 *conc.Future[struct{}]) *MockSyncManager_SyncData_Call
func (*MockSyncManager_SyncData_Call) Run ¶
func (_c *MockSyncManager_SyncData_Call) Run(run func(ctx context.Context, task Task, callbacks ...func(error) error)) *MockSyncManager_SyncData_Call
func (*MockSyncManager_SyncData_Call) RunAndReturn ¶
func (_c *MockSyncManager_SyncData_Call) RunAndReturn(run func(context.Context, Task, ...func(error) error) *conc.Future[struct{}]) *MockSyncManager_SyncData_Call
type MockTask ¶
MockTask is an autogenerated mock type for the Task type
func NewMockTask ¶
NewMockTask creates a new instance of MockTask. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockTask) ChannelName ¶
ChannelName provides a mock function with given fields:
func (*MockTask) Checkpoint ¶
func (_m *MockTask) Checkpoint() *msgpb.MsgPosition
Checkpoint provides a mock function with given fields:
func (*MockTask) EXPECT ¶
func (_m *MockTask) EXPECT() *MockTask_Expecter
func (*MockTask) HandleError ¶
HandleError provides a mock function with given fields: _a0
func (*MockTask) StartPosition ¶
func (_m *MockTask) StartPosition() *msgpb.MsgPosition
StartPosition provides a mock function with given fields:
type MockTask_ChannelName_Call ¶
MockTask_ChannelName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChannelName'
func (*MockTask_ChannelName_Call) Return ¶
func (_c *MockTask_ChannelName_Call) Return(_a0 string) *MockTask_ChannelName_Call
func (*MockTask_ChannelName_Call) Run ¶
func (_c *MockTask_ChannelName_Call) Run(run func()) *MockTask_ChannelName_Call
func (*MockTask_ChannelName_Call) RunAndReturn ¶
func (_c *MockTask_ChannelName_Call) RunAndReturn(run func() string) *MockTask_ChannelName_Call
type MockTask_Checkpoint_Call ¶
MockTask_Checkpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Checkpoint'
func (*MockTask_Checkpoint_Call) Return ¶
func (_c *MockTask_Checkpoint_Call) Return(_a0 *msgpb.MsgPosition) *MockTask_Checkpoint_Call
func (*MockTask_Checkpoint_Call) Run ¶
func (_c *MockTask_Checkpoint_Call) Run(run func()) *MockTask_Checkpoint_Call
func (*MockTask_Checkpoint_Call) RunAndReturn ¶
func (_c *MockTask_Checkpoint_Call) RunAndReturn(run func() *msgpb.MsgPosition) *MockTask_Checkpoint_Call
type MockTask_Expecter ¶
type MockTask_Expecter struct {
// contains filtered or unexported fields
}
func (*MockTask_Expecter) ChannelName ¶
func (_e *MockTask_Expecter) ChannelName() *MockTask_ChannelName_Call
ChannelName is a helper method to define mock.On call
func (*MockTask_Expecter) Checkpoint ¶
func (_e *MockTask_Expecter) Checkpoint() *MockTask_Checkpoint_Call
Checkpoint is a helper method to define mock.On call
func (*MockTask_Expecter) HandleError ¶
func (_e *MockTask_Expecter) HandleError(_a0 interface{}) *MockTask_HandleError_Call
HandleError is a helper method to define mock.On call
- _a0 error
func (*MockTask_Expecter) Run ¶
func (_e *MockTask_Expecter) Run(_a0 interface{}) *MockTask_Run_Call
Run is a helper method to define mock.On call
- _a0 context.Context
func (*MockTask_Expecter) SegmentID ¶
func (_e *MockTask_Expecter) SegmentID() *MockTask_SegmentID_Call
SegmentID is a helper method to define mock.On call
func (*MockTask_Expecter) StartPosition ¶
func (_e *MockTask_Expecter) StartPosition() *MockTask_StartPosition_Call
StartPosition is a helper method to define mock.On call
type MockTask_HandleError_Call ¶
MockTask_HandleError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleError'
func (*MockTask_HandleError_Call) Return ¶
func (_c *MockTask_HandleError_Call) Return() *MockTask_HandleError_Call
func (*MockTask_HandleError_Call) Run ¶
func (_c *MockTask_HandleError_Call) Run(run func(_a0 error)) *MockTask_HandleError_Call
func (*MockTask_HandleError_Call) RunAndReturn ¶
func (_c *MockTask_HandleError_Call) RunAndReturn(run func(error)) *MockTask_HandleError_Call
type MockTask_Run_Call ¶
MockTask_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
func (*MockTask_Run_Call) Return ¶
func (_c *MockTask_Run_Call) Return(_a0 error) *MockTask_Run_Call
func (*MockTask_Run_Call) Run ¶
func (_c *MockTask_Run_Call) Run(run func(_a0 context.Context)) *MockTask_Run_Call
func (*MockTask_Run_Call) RunAndReturn ¶
func (_c *MockTask_Run_Call) RunAndReturn(run func(context.Context) error) *MockTask_Run_Call
type MockTask_SegmentID_Call ¶
MockTask_SegmentID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SegmentID'
func (*MockTask_SegmentID_Call) Return ¶
func (_c *MockTask_SegmentID_Call) Return(_a0 int64) *MockTask_SegmentID_Call
func (*MockTask_SegmentID_Call) Run ¶
func (_c *MockTask_SegmentID_Call) Run(run func()) *MockTask_SegmentID_Call
func (*MockTask_SegmentID_Call) RunAndReturn ¶
func (_c *MockTask_SegmentID_Call) RunAndReturn(run func() int64) *MockTask_SegmentID_Call
type MockTask_StartPosition_Call ¶
MockTask_StartPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartPosition'
func (*MockTask_StartPosition_Call) Return ¶
func (_c *MockTask_StartPosition_Call) Return(_a0 *msgpb.MsgPosition) *MockTask_StartPosition_Call
func (*MockTask_StartPosition_Call) Run ¶
func (_c *MockTask_StartPosition_Call) Run(run func()) *MockTask_StartPosition_Call
func (*MockTask_StartPosition_Call) RunAndReturn ¶
func (_c *MockTask_StartPosition_Call) RunAndReturn(run func() *msgpb.MsgPosition) *MockTask_StartPosition_Call
type Serializer ¶
Serializer is the interface for storage/storageV2 implementation to encoding WriteBuffer into sync task.
type SyncManager ¶
type SyncManager interface { // SyncData is the method to submit sync task. SyncData(ctx context.Context, task Task, callbacks ...func(error) error) *conc.Future[struct{}] }
SyncManager is the interface for sync manager. it processes the sync tasks inside and changes the meta.
func NewSyncManager ¶
func NewSyncManager(chunkManager storage.ChunkManager) SyncManager
type SyncManagerOption ¶
type SyncManagerOption struct {
// contains filtered or unexported fields
}
type SyncPack ¶
type SyncPack struct {
// contains filtered or unexported fields
}
SyncPack is the struct contains buffer sync data.
func (*SyncPack) WithBatchSize ¶
func (*SyncPack) WithChannelName ¶
func (*SyncPack) WithCheckpoint ¶
func (p *SyncPack) WithCheckpoint(cp *msgpb.MsgPosition) *SyncPack
func (*SyncPack) WithCollectionID ¶
func (*SyncPack) WithDeleteData ¶
func (p *SyncPack) WithDeleteData(deltaData *storage.DeleteData) *SyncPack
func (*SyncPack) WithInsertData ¶
func (p *SyncPack) WithInsertData(insertData []*storage.InsertData) *SyncPack
func (*SyncPack) WithPartitionID ¶
func (*SyncPack) WithSegmentID ¶
func (*SyncPack) WithStartPosition ¶
func (p *SyncPack) WithStartPosition(start *msgpb.MsgPosition) *SyncPack
type SyncTask ¶
type SyncTask struct {
// contains filtered or unexported fields
}
func NewSyncTask ¶
func NewSyncTask() *SyncTask
func (*SyncTask) Binlogs ¶
func (t *SyncTask) Binlogs() (map[int64]*datapb.FieldBinlog, map[int64]*datapb.FieldBinlog, *datapb.FieldBinlog)
func (*SyncTask) ChannelName ¶
func (*SyncTask) Checkpoint ¶
func (t *SyncTask) Checkpoint() *msgpb.MsgPosition
func (*SyncTask) HandleError ¶
func (*SyncTask) StartPosition ¶
func (t *SyncTask) StartPosition() *msgpb.MsgPosition
func (*SyncTask) WithAllocator ¶
func (*SyncTask) WithBatchSize ¶
func (*SyncTask) WithChannelName ¶
func (*SyncTask) WithCheckpoint ¶
func (t *SyncTask) WithCheckpoint(cp *msgpb.MsgPosition) *SyncTask
func (*SyncTask) WithChunkManager ¶
func (t *SyncTask) WithChunkManager(cm storage.ChunkManager) *SyncTask
func (*SyncTask) WithCollectionID ¶
func (*SyncTask) WithFailureCallback ¶
func (*SyncTask) WithMetaCache ¶
func (*SyncTask) WithMetaWriter ¶
func (t *SyncTask) WithMetaWriter(metaWriter MetaWriter) *SyncTask
func (*SyncTask) WithPartitionID ¶
func (*SyncTask) WithSchema ¶
func (t *SyncTask) WithSchema(schema *schemapb.CollectionSchema) *SyncTask
func (*SyncTask) WithSegmentID ¶
func (*SyncTask) WithStartPosition ¶
func (t *SyncTask) WithStartPosition(start *msgpb.MsgPosition) *SyncTask