Documentation ¶
Index ¶
- type DataNodeCreatorFunc
- type DataNodeManager
- type DataNodeManagerImpl
- func (c *DataNodeManagerImpl) AddSession(node *NodeInfo)
- func (c *DataNodeManagerImpl) CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)
- func (c *DataNodeManagerImpl) CheckHealth(ctx context.Context) error
- func (c *DataNodeManagerImpl) Close()
- func (c *DataNodeManagerImpl) Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error
- func (c *DataNodeManagerImpl) DeleteSession(node *NodeInfo)
- func (c *DataNodeManagerImpl) DropCompactionPlan(nodeID int64, req *datapb.DropCompactionPlanRequest) error
- func (c *DataNodeManagerImpl) DropImport(nodeID int64, in *datapb.DropImportRequest) error
- func (c *DataNodeManagerImpl) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)
- func (c *DataNodeManagerImpl) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error
- func (c *DataNodeManagerImpl) GetCompactionPlanResult(nodeID int64, planID int64) (*datapb.CompactionPlanResult, error)
- func (c *DataNodeManagerImpl) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)
- func (c *DataNodeManagerImpl) GetSession(nodeID int64) (*Session, bool)
- func (c *DataNodeManagerImpl) GetSessionIDs() []int64
- func (c *DataNodeManagerImpl) GetSessions() []*Session
- func (c *DataNodeManagerImpl) ImportV2(nodeID int64, in *datapb.ImportRequest) error
- func (c *DataNodeManagerImpl) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error
- func (c *DataNodeManagerImpl) PreImport(nodeID int64, in *datapb.PreImportRequest) error
- func (c *DataNodeManagerImpl) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)
- func (c *DataNodeManagerImpl) QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)
- func (c *DataNodeManagerImpl) QuerySlot(nodeID int64) (*datapb.QuerySlotResponse, error)
- func (c *DataNodeManagerImpl) SyncSegments(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest) error
- type IndexNodeCreatorFunc
- type IndexNodeManager
- func (nm *IndexNodeManager) AddNode(nodeID typeutil.UniqueID, address string) error
- func (nm *IndexNodeManager) ClientSupportDisk() bool
- func (nm *IndexNodeManager) GetAllClients() map[typeutil.UniqueID]types.IndexNodeClient
- func (nm *IndexNodeManager) GetClientByID(nodeID typeutil.UniqueID) (types.IndexNodeClient, bool)
- func (nm *IndexNodeManager) PickClient() (typeutil.UniqueID, types.IndexNodeClient)
- func (nm *IndexNodeManager) RemoveNode(nodeID typeutil.UniqueID)
- func (nm *IndexNodeManager) SetClient(nodeID typeutil.UniqueID, client types.IndexNodeClient)
- func (nm *IndexNodeManager) StoppingNode(nodeID typeutil.UniqueID)
- type MockDataNodeManager
- func (_m *MockDataNodeManager) AddSession(node *NodeInfo)
- func (_m *MockDataNodeManager) CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)
- func (_m *MockDataNodeManager) CheckHealth(ctx context.Context) error
- func (_m *MockDataNodeManager) Close()
- func (_m *MockDataNodeManager) Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error
- func (_m *MockDataNodeManager) DeleteSession(node *NodeInfo)
- func (_m *MockDataNodeManager) DropCompactionPlan(nodeID int64, req *datapb.DropCompactionPlanRequest) error
- func (_m *MockDataNodeManager) DropImport(nodeID int64, in *datapb.DropImportRequest) error
- func (_m *MockDataNodeManager) EXPECT() *MockDataNodeManager_Expecter
- func (_m *MockDataNodeManager) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)
- func (_m *MockDataNodeManager) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error
- func (_m *MockDataNodeManager) GetCompactionPlanResult(nodeID int64, planID int64) (*datapb.CompactionPlanResult, error)
- func (_m *MockDataNodeManager) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)
- func (_m *MockDataNodeManager) GetSession(_a0 int64) (*Session, bool)
- func (_m *MockDataNodeManager) GetSessionIDs() []int64
- func (_m *MockDataNodeManager) GetSessions() []*Session
- func (_m *MockDataNodeManager) ImportV2(nodeID int64, in *datapb.ImportRequest) error
- func (_m *MockDataNodeManager) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error
- func (_m *MockDataNodeManager) PreImport(nodeID int64, in *datapb.PreImportRequest) error
- func (_m *MockDataNodeManager) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)
- func (_m *MockDataNodeManager) QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)
- func (_m *MockDataNodeManager) QuerySlot(nodeID int64) (*datapb.QuerySlotResponse, error)
- func (_m *MockDataNodeManager) SyncSegments(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest) error
- type MockDataNodeManager_AddSession_Call
- func (_c *MockDataNodeManager_AddSession_Call) Return() *MockDataNodeManager_AddSession_Call
- func (_c *MockDataNodeManager_AddSession_Call) Run(run func(node *NodeInfo)) *MockDataNodeManager_AddSession_Call
- func (_c *MockDataNodeManager_AddSession_Call) RunAndReturn(run func(*NodeInfo)) *MockDataNodeManager_AddSession_Call
- type MockDataNodeManager_CheckChannelOperationProgress_Call
- func (_c *MockDataNodeManager_CheckChannelOperationProgress_Call) Return(_a0 *datapb.ChannelOperationProgressResponse, _a1 error) *MockDataNodeManager_CheckChannelOperationProgress_Call
- func (_c *MockDataNodeManager_CheckChannelOperationProgress_Call) Run(run func(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo)) *MockDataNodeManager_CheckChannelOperationProgress_Call
- func (_c *MockDataNodeManager_CheckChannelOperationProgress_Call) RunAndReturn(...) *MockDataNodeManager_CheckChannelOperationProgress_Call
- type MockDataNodeManager_CheckHealth_Call
- func (_c *MockDataNodeManager_CheckHealth_Call) Return(_a0 error) *MockDataNodeManager_CheckHealth_Call
- func (_c *MockDataNodeManager_CheckHealth_Call) Run(run func(ctx context.Context)) *MockDataNodeManager_CheckHealth_Call
- func (_c *MockDataNodeManager_CheckHealth_Call) RunAndReturn(run func(context.Context) error) *MockDataNodeManager_CheckHealth_Call
- type MockDataNodeManager_Close_Call
- type MockDataNodeManager_Compaction_Call
- func (_c *MockDataNodeManager_Compaction_Call) Return(_a0 error) *MockDataNodeManager_Compaction_Call
- func (_c *MockDataNodeManager_Compaction_Call) Run(run func(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan)) *MockDataNodeManager_Compaction_Call
- func (_c *MockDataNodeManager_Compaction_Call) RunAndReturn(run func(context.Context, int64, *datapb.CompactionPlan) error) *MockDataNodeManager_Compaction_Call
- type MockDataNodeManager_DeleteSession_Call
- func (_c *MockDataNodeManager_DeleteSession_Call) Return() *MockDataNodeManager_DeleteSession_Call
- func (_c *MockDataNodeManager_DeleteSession_Call) Run(run func(node *NodeInfo)) *MockDataNodeManager_DeleteSession_Call
- func (_c *MockDataNodeManager_DeleteSession_Call) RunAndReturn(run func(*NodeInfo)) *MockDataNodeManager_DeleteSession_Call
- type MockDataNodeManager_DropCompactionPlan_Call
- func (_c *MockDataNodeManager_DropCompactionPlan_Call) Return(_a0 error) *MockDataNodeManager_DropCompactionPlan_Call
- func (_c *MockDataNodeManager_DropCompactionPlan_Call) Run(run func(nodeID int64, req *datapb.DropCompactionPlanRequest)) *MockDataNodeManager_DropCompactionPlan_Call
- func (_c *MockDataNodeManager_DropCompactionPlan_Call) RunAndReturn(run func(int64, *datapb.DropCompactionPlanRequest) error) *MockDataNodeManager_DropCompactionPlan_Call
- type MockDataNodeManager_DropImport_Call
- func (_c *MockDataNodeManager_DropImport_Call) Return(_a0 error) *MockDataNodeManager_DropImport_Call
- func (_c *MockDataNodeManager_DropImport_Call) Run(run func(nodeID int64, in *datapb.DropImportRequest)) *MockDataNodeManager_DropImport_Call
- func (_c *MockDataNodeManager_DropImport_Call) RunAndReturn(run func(int64, *datapb.DropImportRequest) error) *MockDataNodeManager_DropImport_Call
- type MockDataNodeManager_Expecter
- func (_e *MockDataNodeManager_Expecter) AddSession(node interface{}) *MockDataNodeManager_AddSession_Call
- func (_e *MockDataNodeManager_Expecter) CheckChannelOperationProgress(ctx interface{}, nodeID interface{}, info interface{}) *MockDataNodeManager_CheckChannelOperationProgress_Call
- func (_e *MockDataNodeManager_Expecter) CheckHealth(ctx interface{}) *MockDataNodeManager_CheckHealth_Call
- func (_e *MockDataNodeManager_Expecter) Close() *MockDataNodeManager_Close_Call
- func (_e *MockDataNodeManager_Expecter) Compaction(ctx interface{}, nodeID interface{}, plan interface{}) *MockDataNodeManager_Compaction_Call
- func (_e *MockDataNodeManager_Expecter) DeleteSession(node interface{}) *MockDataNodeManager_DeleteSession_Call
- func (_e *MockDataNodeManager_Expecter) DropCompactionPlan(nodeID interface{}, req interface{}) *MockDataNodeManager_DropCompactionPlan_Call
- func (_e *MockDataNodeManager_Expecter) DropImport(nodeID interface{}, in interface{}) *MockDataNodeManager_DropImport_Call
- func (_e *MockDataNodeManager_Expecter) Flush(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_Flush_Call
- func (_e *MockDataNodeManager_Expecter) FlushChannels(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_FlushChannels_Call
- func (_e *MockDataNodeManager_Expecter) GetCompactionPlanResult(nodeID interface{}, planID interface{}) *MockDataNodeManager_GetCompactionPlanResult_Call
- func (_e *MockDataNodeManager_Expecter) GetCompactionPlansResults() *MockDataNodeManager_GetCompactionPlansResults_Call
- func (_e *MockDataNodeManager_Expecter) GetSession(_a0 interface{}) *MockDataNodeManager_GetSession_Call
- func (_e *MockDataNodeManager_Expecter) GetSessionIDs() *MockDataNodeManager_GetSessionIDs_Call
- func (_e *MockDataNodeManager_Expecter) GetSessions() *MockDataNodeManager_GetSessions_Call
- func (_e *MockDataNodeManager_Expecter) ImportV2(nodeID interface{}, in interface{}) *MockDataNodeManager_ImportV2_Call
- func (_e *MockDataNodeManager_Expecter) NotifyChannelOperation(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_NotifyChannelOperation_Call
- func (_e *MockDataNodeManager_Expecter) PreImport(nodeID interface{}, in interface{}) *MockDataNodeManager_PreImport_Call
- func (_e *MockDataNodeManager_Expecter) QueryImport(nodeID interface{}, in interface{}) *MockDataNodeManager_QueryImport_Call
- func (_e *MockDataNodeManager_Expecter) QueryPreImport(nodeID interface{}, in interface{}) *MockDataNodeManager_QueryPreImport_Call
- func (_e *MockDataNodeManager_Expecter) QuerySlot(nodeID interface{}) *MockDataNodeManager_QuerySlot_Call
- func (_e *MockDataNodeManager_Expecter) SyncSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_SyncSegments_Call
- type MockDataNodeManager_FlushChannels_Call
- func (_c *MockDataNodeManager_FlushChannels_Call) Return(_a0 error) *MockDataNodeManager_FlushChannels_Call
- func (_c *MockDataNodeManager_FlushChannels_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest)) *MockDataNodeManager_FlushChannels_Call
- func (_c *MockDataNodeManager_FlushChannels_Call) RunAndReturn(run func(context.Context, int64, *datapb.FlushChannelsRequest) error) *MockDataNodeManager_FlushChannels_Call
- type MockDataNodeManager_Flush_Call
- func (_c *MockDataNodeManager_Flush_Call) Return() *MockDataNodeManager_Flush_Call
- func (_c *MockDataNodeManager_Flush_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)) *MockDataNodeManager_Flush_Call
- func (_c *MockDataNodeManager_Flush_Call) RunAndReturn(run func(context.Context, int64, *datapb.FlushSegmentsRequest)) *MockDataNodeManager_Flush_Call
- type MockDataNodeManager_GetCompactionPlanResult_Call
- func (_c *MockDataNodeManager_GetCompactionPlanResult_Call) Return(_a0 *datapb.CompactionPlanResult, _a1 error) *MockDataNodeManager_GetCompactionPlanResult_Call
- func (_c *MockDataNodeManager_GetCompactionPlanResult_Call) Run(run func(nodeID int64, planID int64)) *MockDataNodeManager_GetCompactionPlanResult_Call
- func (_c *MockDataNodeManager_GetCompactionPlanResult_Call) RunAndReturn(run func(int64, int64) (*datapb.CompactionPlanResult, error)) *MockDataNodeManager_GetCompactionPlanResult_Call
- type MockDataNodeManager_GetCompactionPlansResults_Call
- func (_c *MockDataNodeManager_GetCompactionPlansResults_Call) Return(_a0 map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], _a1 error) *MockDataNodeManager_GetCompactionPlansResults_Call
- func (_c *MockDataNodeManager_GetCompactionPlansResults_Call) Run(run func()) *MockDataNodeManager_GetCompactionPlansResults_Call
- func (_c *MockDataNodeManager_GetCompactionPlansResults_Call) RunAndReturn(...) *MockDataNodeManager_GetCompactionPlansResults_Call
- type MockDataNodeManager_GetSessionIDs_Call
- func (_c *MockDataNodeManager_GetSessionIDs_Call) Return(_a0 []int64) *MockDataNodeManager_GetSessionIDs_Call
- func (_c *MockDataNodeManager_GetSessionIDs_Call) Run(run func()) *MockDataNodeManager_GetSessionIDs_Call
- func (_c *MockDataNodeManager_GetSessionIDs_Call) RunAndReturn(run func() []int64) *MockDataNodeManager_GetSessionIDs_Call
- type MockDataNodeManager_GetSession_Call
- func (_c *MockDataNodeManager_GetSession_Call) Return(_a0 *Session, _a1 bool) *MockDataNodeManager_GetSession_Call
- func (_c *MockDataNodeManager_GetSession_Call) Run(run func(_a0 int64)) *MockDataNodeManager_GetSession_Call
- func (_c *MockDataNodeManager_GetSession_Call) RunAndReturn(run func(int64) (*Session, bool)) *MockDataNodeManager_GetSession_Call
- type MockDataNodeManager_GetSessions_Call
- func (_c *MockDataNodeManager_GetSessions_Call) Return(_a0 []*Session) *MockDataNodeManager_GetSessions_Call
- func (_c *MockDataNodeManager_GetSessions_Call) Run(run func()) *MockDataNodeManager_GetSessions_Call
- func (_c *MockDataNodeManager_GetSessions_Call) RunAndReturn(run func() []*Session) *MockDataNodeManager_GetSessions_Call
- type MockDataNodeManager_ImportV2_Call
- func (_c *MockDataNodeManager_ImportV2_Call) Return(_a0 error) *MockDataNodeManager_ImportV2_Call
- func (_c *MockDataNodeManager_ImportV2_Call) Run(run func(nodeID int64, in *datapb.ImportRequest)) *MockDataNodeManager_ImportV2_Call
- func (_c *MockDataNodeManager_ImportV2_Call) RunAndReturn(run func(int64, *datapb.ImportRequest) error) *MockDataNodeManager_ImportV2_Call
- type MockDataNodeManager_NotifyChannelOperation_Call
- func (_c *MockDataNodeManager_NotifyChannelOperation_Call) Return(_a0 error) *MockDataNodeManager_NotifyChannelOperation_Call
- func (_c *MockDataNodeManager_NotifyChannelOperation_Call) Run(...) *MockDataNodeManager_NotifyChannelOperation_Call
- func (_c *MockDataNodeManager_NotifyChannelOperation_Call) RunAndReturn(run func(context.Context, int64, *datapb.ChannelOperationsRequest) error) *MockDataNodeManager_NotifyChannelOperation_Call
- type MockDataNodeManager_PreImport_Call
- func (_c *MockDataNodeManager_PreImport_Call) Return(_a0 error) *MockDataNodeManager_PreImport_Call
- func (_c *MockDataNodeManager_PreImport_Call) Run(run func(nodeID int64, in *datapb.PreImportRequest)) *MockDataNodeManager_PreImport_Call
- func (_c *MockDataNodeManager_PreImport_Call) RunAndReturn(run func(int64, *datapb.PreImportRequest) error) *MockDataNodeManager_PreImport_Call
- type MockDataNodeManager_QueryImport_Call
- func (_c *MockDataNodeManager_QueryImport_Call) Return(_a0 *datapb.QueryImportResponse, _a1 error) *MockDataNodeManager_QueryImport_Call
- func (_c *MockDataNodeManager_QueryImport_Call) Run(run func(nodeID int64, in *datapb.QueryImportRequest)) *MockDataNodeManager_QueryImport_Call
- func (_c *MockDataNodeManager_QueryImport_Call) RunAndReturn(...) *MockDataNodeManager_QueryImport_Call
- type MockDataNodeManager_QueryPreImport_Call
- func (_c *MockDataNodeManager_QueryPreImport_Call) Return(_a0 *datapb.QueryPreImportResponse, _a1 error) *MockDataNodeManager_QueryPreImport_Call
- func (_c *MockDataNodeManager_QueryPreImport_Call) Run(run func(nodeID int64, in *datapb.QueryPreImportRequest)) *MockDataNodeManager_QueryPreImport_Call
- func (_c *MockDataNodeManager_QueryPreImport_Call) RunAndReturn(...) *MockDataNodeManager_QueryPreImport_Call
- type MockDataNodeManager_QuerySlot_Call
- func (_c *MockDataNodeManager_QuerySlot_Call) Return(_a0 *datapb.QuerySlotResponse, _a1 error) *MockDataNodeManager_QuerySlot_Call
- func (_c *MockDataNodeManager_QuerySlot_Call) Run(run func(nodeID int64)) *MockDataNodeManager_QuerySlot_Call
- func (_c *MockDataNodeManager_QuerySlot_Call) RunAndReturn(run func(int64) (*datapb.QuerySlotResponse, error)) *MockDataNodeManager_QuerySlot_Call
- type MockDataNodeManager_SyncSegments_Call
- func (_c *MockDataNodeManager_SyncSegments_Call) Return(_a0 error) *MockDataNodeManager_SyncSegments_Call
- func (_c *MockDataNodeManager_SyncSegments_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest)) *MockDataNodeManager_SyncSegments_Call
- func (_c *MockDataNodeManager_SyncSegments_Call) RunAndReturn(run func(context.Context, int64, *datapb.SyncSegmentsRequest) error) *MockDataNodeManager_SyncSegments_Call
- type MockWorkerManager
- func (_m *MockWorkerManager) AddNode(nodeID int64, address string) error
- func (_m *MockWorkerManager) ClientSupportDisk() bool
- func (_m *MockWorkerManager) EXPECT() *MockWorkerManager_Expecter
- func (_m *MockWorkerManager) GetAllClients() map[int64]types.IndexNodeClient
- func (_m *MockWorkerManager) GetClientByID(nodeID int64) (types.IndexNodeClient, bool)
- func (_m *MockWorkerManager) PickClient() (int64, types.IndexNodeClient)
- func (_m *MockWorkerManager) RemoveNode(nodeID int64)
- func (_m *MockWorkerManager) StoppingNode(nodeID int64)
- type MockWorkerManager_AddNode_Call
- func (_c *MockWorkerManager_AddNode_Call) Return(_a0 error) *MockWorkerManager_AddNode_Call
- func (_c *MockWorkerManager_AddNode_Call) Run(run func(nodeID int64, address string)) *MockWorkerManager_AddNode_Call
- func (_c *MockWorkerManager_AddNode_Call) RunAndReturn(run func(int64, string) error) *MockWorkerManager_AddNode_Call
- type MockWorkerManager_ClientSupportDisk_Call
- func (_c *MockWorkerManager_ClientSupportDisk_Call) Return(_a0 bool) *MockWorkerManager_ClientSupportDisk_Call
- func (_c *MockWorkerManager_ClientSupportDisk_Call) Run(run func()) *MockWorkerManager_ClientSupportDisk_Call
- func (_c *MockWorkerManager_ClientSupportDisk_Call) RunAndReturn(run func() bool) *MockWorkerManager_ClientSupportDisk_Call
- type MockWorkerManager_Expecter
- func (_e *MockWorkerManager_Expecter) AddNode(nodeID interface{}, address interface{}) *MockWorkerManager_AddNode_Call
- func (_e *MockWorkerManager_Expecter) ClientSupportDisk() *MockWorkerManager_ClientSupportDisk_Call
- func (_e *MockWorkerManager_Expecter) GetAllClients() *MockWorkerManager_GetAllClients_Call
- func (_e *MockWorkerManager_Expecter) GetClientByID(nodeID interface{}) *MockWorkerManager_GetClientByID_Call
- func (_e *MockWorkerManager_Expecter) PickClient() *MockWorkerManager_PickClient_Call
- func (_e *MockWorkerManager_Expecter) RemoveNode(nodeID interface{}) *MockWorkerManager_RemoveNode_Call
- func (_e *MockWorkerManager_Expecter) StoppingNode(nodeID interface{}) *MockWorkerManager_StoppingNode_Call
- type MockWorkerManager_GetAllClients_Call
- func (_c *MockWorkerManager_GetAllClients_Call) Return(_a0 map[int64]types.IndexNodeClient) *MockWorkerManager_GetAllClients_Call
- func (_c *MockWorkerManager_GetAllClients_Call) Run(run func()) *MockWorkerManager_GetAllClients_Call
- func (_c *MockWorkerManager_GetAllClients_Call) RunAndReturn(run func() map[int64]types.IndexNodeClient) *MockWorkerManager_GetAllClients_Call
- type MockWorkerManager_GetClientByID_Call
- func (_c *MockWorkerManager_GetClientByID_Call) Return(_a0 types.IndexNodeClient, _a1 bool) *MockWorkerManager_GetClientByID_Call
- func (_c *MockWorkerManager_GetClientByID_Call) Run(run func(nodeID int64)) *MockWorkerManager_GetClientByID_Call
- func (_c *MockWorkerManager_GetClientByID_Call) RunAndReturn(run func(int64) (types.IndexNodeClient, bool)) *MockWorkerManager_GetClientByID_Call
- type MockWorkerManager_PickClient_Call
- func (_c *MockWorkerManager_PickClient_Call) Return(_a0 int64, _a1 types.IndexNodeClient) *MockWorkerManager_PickClient_Call
- func (_c *MockWorkerManager_PickClient_Call) Run(run func()) *MockWorkerManager_PickClient_Call
- func (_c *MockWorkerManager_PickClient_Call) RunAndReturn(run func() (int64, types.IndexNodeClient)) *MockWorkerManager_PickClient_Call
- type MockWorkerManager_RemoveNode_Call
- func (_c *MockWorkerManager_RemoveNode_Call) Return() *MockWorkerManager_RemoveNode_Call
- func (_c *MockWorkerManager_RemoveNode_Call) Run(run func(nodeID int64)) *MockWorkerManager_RemoveNode_Call
- func (_c *MockWorkerManager_RemoveNode_Call) RunAndReturn(run func(int64)) *MockWorkerManager_RemoveNode_Call
- type MockWorkerManager_StoppingNode_Call
- func (_c *MockWorkerManager_StoppingNode_Call) Return() *MockWorkerManager_StoppingNode_Call
- func (_c *MockWorkerManager_StoppingNode_Call) Run(run func(nodeID int64)) *MockWorkerManager_StoppingNode_Call
- func (_c *MockWorkerManager_StoppingNode_Call) RunAndReturn(run func(int64)) *MockWorkerManager_StoppingNode_Call
- type NodeInfo
- type Session
- type SessionOpt
- type WorkerManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataNodeCreatorFunc ¶
type DataNodeManager ¶
type DataNodeManager interface { AddSession(node *NodeInfo) DeleteSession(node *NodeInfo) GetSessionIDs() []int64 GetSessions() []*Session GetSession(int64) (*Session, bool) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error SyncSegments(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest) error GetCompactionPlanResult(nodeID int64, planID int64) (*datapb.CompactionPlanResult, error) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error) PreImport(nodeID int64, in *datapb.PreImportRequest) error ImportV2(nodeID int64, in *datapb.ImportRequest) error QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error) DropImport(nodeID int64, in *datapb.DropImportRequest) error CheckHealth(ctx context.Context) error QuerySlot(nodeID int64) (*datapb.QuerySlotResponse, error) DropCompactionPlan(nodeID int64, req *datapb.DropCompactionPlanRequest) error Close() }
DataNodeManager is the interface for datanode session manager.
type DataNodeManagerImpl ¶
type DataNodeManagerImpl struct {
// contains filtered or unexported fields
}
DataNodeManagerImpl provides the grpc interfaces of cluster
func NewDataNodeManagerImpl ¶
func NewDataNodeManagerImpl(options ...SessionOpt) *DataNodeManagerImpl
NewDataNodeManagerImpl creates a new NewDataNodeManagerImpl
func (*DataNodeManagerImpl) AddSession ¶
func (c *DataNodeManagerImpl) AddSession(node *NodeInfo)
AddSession creates a new session
func (*DataNodeManagerImpl) CheckChannelOperationProgress ¶
func (c *DataNodeManagerImpl) CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)
func (*DataNodeManagerImpl) CheckHealth ¶
func (c *DataNodeManagerImpl) CheckHealth(ctx context.Context) error
func (*DataNodeManagerImpl) Compaction ¶
func (c *DataNodeManagerImpl) Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error
Compaction is a grpc interface. It will send request to DataNode with provided `nodeID` synchronously.
func (*DataNodeManagerImpl) DeleteSession ¶
func (c *DataNodeManagerImpl) DeleteSession(node *NodeInfo)
DeleteSession removes the node session
func (*DataNodeManagerImpl) DropCompactionPlan ¶
func (c *DataNodeManagerImpl) DropCompactionPlan(nodeID int64, req *datapb.DropCompactionPlanRequest) error
func (*DataNodeManagerImpl) DropImport ¶
func (c *DataNodeManagerImpl) DropImport(nodeID int64, in *datapb.DropImportRequest) error
func (*DataNodeManagerImpl) Flush ¶
func (c *DataNodeManagerImpl) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)
Flush is a grpc interface. It will send req to nodeID asynchronously
func (*DataNodeManagerImpl) FlushChannels ¶
func (c *DataNodeManagerImpl) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error
func (*DataNodeManagerImpl) GetCompactionPlanResult ¶
func (c *DataNodeManagerImpl) GetCompactionPlanResult(nodeID int64, planID int64) (*datapb.CompactionPlanResult, error)
func (*DataNodeManagerImpl) GetCompactionPlansResults ¶
func (c *DataNodeManagerImpl) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)
GetCompactionPlansResults returns map[planID]*pair[nodeID, *CompactionPlanResults]
func (*DataNodeManagerImpl) GetSession ¶
func (c *DataNodeManagerImpl) GetSession(nodeID int64) (*Session, bool)
GetSession return a Session related to nodeID
func (*DataNodeManagerImpl) GetSessionIDs ¶
func (c *DataNodeManagerImpl) GetSessionIDs() []int64
GetSessionIDs returns IDs of all live DataNodes.
func (*DataNodeManagerImpl) GetSessions ¶
func (c *DataNodeManagerImpl) GetSessions() []*Session
GetSessions gets all node sessions
func (*DataNodeManagerImpl) ImportV2 ¶
func (c *DataNodeManagerImpl) ImportV2(nodeID int64, in *datapb.ImportRequest) error
func (*DataNodeManagerImpl) NotifyChannelOperation ¶
func (c *DataNodeManagerImpl) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error
func (*DataNodeManagerImpl) PreImport ¶
func (c *DataNodeManagerImpl) PreImport(nodeID int64, in *datapb.PreImportRequest) error
func (*DataNodeManagerImpl) QueryImport ¶
func (c *DataNodeManagerImpl) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)
func (*DataNodeManagerImpl) QueryPreImport ¶
func (c *DataNodeManagerImpl) QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)
func (*DataNodeManagerImpl) QuerySlot ¶
func (c *DataNodeManagerImpl) QuerySlot(nodeID int64) (*datapb.QuerySlotResponse, error)
func (*DataNodeManagerImpl) SyncSegments ¶
func (c *DataNodeManagerImpl) SyncSegments(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest) error
SyncSegments is a grpc interface. It will send request to DataNode with provided `nodeID` synchronously.
type IndexNodeCreatorFunc ¶
type IndexNodeManager ¶
type IndexNodeManager struct {
// contains filtered or unexported fields
}
IndexNodeManager is used to manage the client of IndexNode.
func NewNodeManager ¶
func NewNodeManager(ctx context.Context, indexNodeCreator IndexNodeCreatorFunc) *IndexNodeManager
NewNodeManager is used to create a new IndexNodeManager.
func (*IndexNodeManager) AddNode ¶
func (nm *IndexNodeManager) AddNode(nodeID typeutil.UniqueID, address string) error
AddNode adds the client of IndexNode.
func (*IndexNodeManager) ClientSupportDisk ¶
func (nm *IndexNodeManager) ClientSupportDisk() bool
func (*IndexNodeManager) GetAllClients ¶
func (nm *IndexNodeManager) GetAllClients() map[typeutil.UniqueID]types.IndexNodeClient
func (*IndexNodeManager) GetClientByID ¶
func (nm *IndexNodeManager) GetClientByID(nodeID typeutil.UniqueID) (types.IndexNodeClient, bool)
func (*IndexNodeManager) PickClient ¶
func (nm *IndexNodeManager) PickClient() (typeutil.UniqueID, types.IndexNodeClient)
func (*IndexNodeManager) RemoveNode ¶
func (nm *IndexNodeManager) RemoveNode(nodeID typeutil.UniqueID)
RemoveNode removes the unused client of IndexNode.
func (*IndexNodeManager) SetClient ¶
func (nm *IndexNodeManager) SetClient(nodeID typeutil.UniqueID, client types.IndexNodeClient)
SetClient sets IndexNode client to node manager.
func (*IndexNodeManager) StoppingNode ¶
func (nm *IndexNodeManager) StoppingNode(nodeID typeutil.UniqueID)
type MockDataNodeManager ¶
MockDataNodeManager is an autogenerated mock type for the DataNodeManager type
func NewMockDataNodeManager ¶
func NewMockDataNodeManager(t interface { mock.TestingT Cleanup(func()) }) *MockDataNodeManager
NewMockDataNodeManager creates a new instance of MockDataNodeManager. 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 (*MockDataNodeManager) AddSession ¶
func (_m *MockDataNodeManager) AddSession(node *NodeInfo)
AddSession provides a mock function with given fields: node
func (*MockDataNodeManager) CheckChannelOperationProgress ¶
func (_m *MockDataNodeManager) CheckChannelOperationProgress(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)
CheckChannelOperationProgress provides a mock function with given fields: ctx, nodeID, info
func (*MockDataNodeManager) CheckHealth ¶
func (_m *MockDataNodeManager) CheckHealth(ctx context.Context) error
CheckHealth provides a mock function with given fields: ctx
func (*MockDataNodeManager) Close ¶
func (_m *MockDataNodeManager) Close()
Close provides a mock function with given fields:
func (*MockDataNodeManager) Compaction ¶
func (_m *MockDataNodeManager) Compaction(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan) error
Compaction provides a mock function with given fields: ctx, nodeID, plan
func (*MockDataNodeManager) DeleteSession ¶
func (_m *MockDataNodeManager) DeleteSession(node *NodeInfo)
DeleteSession provides a mock function with given fields: node
func (*MockDataNodeManager) DropCompactionPlan ¶
func (_m *MockDataNodeManager) DropCompactionPlan(nodeID int64, req *datapb.DropCompactionPlanRequest) error
DropCompactionPlan provides a mock function with given fields: nodeID, req
func (*MockDataNodeManager) DropImport ¶
func (_m *MockDataNodeManager) DropImport(nodeID int64, in *datapb.DropImportRequest) error
DropImport provides a mock function with given fields: nodeID, in
func (*MockDataNodeManager) EXPECT ¶
func (_m *MockDataNodeManager) EXPECT() *MockDataNodeManager_Expecter
func (*MockDataNodeManager) Flush ¶
func (_m *MockDataNodeManager) Flush(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)
Flush provides a mock function with given fields: ctx, nodeID, req
func (*MockDataNodeManager) FlushChannels ¶
func (_m *MockDataNodeManager) FlushChannels(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest) error
FlushChannels provides a mock function with given fields: ctx, nodeID, req
func (*MockDataNodeManager) GetCompactionPlanResult ¶
func (_m *MockDataNodeManager) GetCompactionPlanResult(nodeID int64, planID int64) (*datapb.CompactionPlanResult, error)
GetCompactionPlanResult provides a mock function with given fields: nodeID, planID
func (*MockDataNodeManager) GetCompactionPlansResults ¶
func (_m *MockDataNodeManager) GetCompactionPlansResults() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)
GetCompactionPlansResults provides a mock function with given fields:
func (*MockDataNodeManager) GetSession ¶
func (_m *MockDataNodeManager) GetSession(_a0 int64) (*Session, bool)
GetSession provides a mock function with given fields: _a0
func (*MockDataNodeManager) GetSessionIDs ¶
func (_m *MockDataNodeManager) GetSessionIDs() []int64
GetSessionIDs provides a mock function with given fields:
func (*MockDataNodeManager) GetSessions ¶
func (_m *MockDataNodeManager) GetSessions() []*Session
GetSessions provides a mock function with given fields:
func (*MockDataNodeManager) ImportV2 ¶
func (_m *MockDataNodeManager) ImportV2(nodeID int64, in *datapb.ImportRequest) error
ImportV2 provides a mock function with given fields: nodeID, in
func (*MockDataNodeManager) NotifyChannelOperation ¶
func (_m *MockDataNodeManager) NotifyChannelOperation(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest) error
NotifyChannelOperation provides a mock function with given fields: ctx, nodeID, req
func (*MockDataNodeManager) PreImport ¶
func (_m *MockDataNodeManager) PreImport(nodeID int64, in *datapb.PreImportRequest) error
PreImport provides a mock function with given fields: nodeID, in
func (*MockDataNodeManager) QueryImport ¶
func (_m *MockDataNodeManager) QueryImport(nodeID int64, in *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)
QueryImport provides a mock function with given fields: nodeID, in
func (*MockDataNodeManager) QueryPreImport ¶
func (_m *MockDataNodeManager) QueryPreImport(nodeID int64, in *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)
QueryPreImport provides a mock function with given fields: nodeID, in
func (*MockDataNodeManager) QuerySlot ¶
func (_m *MockDataNodeManager) QuerySlot(nodeID int64) (*datapb.QuerySlotResponse, error)
QuerySlot provides a mock function with given fields: nodeID
func (*MockDataNodeManager) SyncSegments ¶
func (_m *MockDataNodeManager) SyncSegments(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest) error
SyncSegments provides a mock function with given fields: ctx, nodeID, req
type MockDataNodeManager_AddSession_Call ¶
MockDataNodeManager_AddSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddSession'
func (*MockDataNodeManager_AddSession_Call) Return ¶
func (_c *MockDataNodeManager_AddSession_Call) Return() *MockDataNodeManager_AddSession_Call
func (*MockDataNodeManager_AddSession_Call) Run ¶
func (_c *MockDataNodeManager_AddSession_Call) Run(run func(node *NodeInfo)) *MockDataNodeManager_AddSession_Call
func (*MockDataNodeManager_AddSession_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_AddSession_Call) RunAndReturn(run func(*NodeInfo)) *MockDataNodeManager_AddSession_Call
type MockDataNodeManager_CheckChannelOperationProgress_Call ¶
MockDataNodeManager_CheckChannelOperationProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckChannelOperationProgress'
func (*MockDataNodeManager_CheckChannelOperationProgress_Call) Run ¶
func (_c *MockDataNodeManager_CheckChannelOperationProgress_Call) Run(run func(ctx context.Context, nodeID int64, info *datapb.ChannelWatchInfo)) *MockDataNodeManager_CheckChannelOperationProgress_Call
func (*MockDataNodeManager_CheckChannelOperationProgress_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_CheckChannelOperationProgress_Call) RunAndReturn(run func(context.Context, int64, *datapb.ChannelWatchInfo) (*datapb.ChannelOperationProgressResponse, error)) *MockDataNodeManager_CheckChannelOperationProgress_Call
type MockDataNodeManager_CheckHealth_Call ¶
MockDataNodeManager_CheckHealth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckHealth'
func (*MockDataNodeManager_CheckHealth_Call) Return ¶
func (_c *MockDataNodeManager_CheckHealth_Call) Return(_a0 error) *MockDataNodeManager_CheckHealth_Call
func (*MockDataNodeManager_CheckHealth_Call) Run ¶
func (_c *MockDataNodeManager_CheckHealth_Call) Run(run func(ctx context.Context)) *MockDataNodeManager_CheckHealth_Call
func (*MockDataNodeManager_CheckHealth_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_CheckHealth_Call) RunAndReturn(run func(context.Context) error) *MockDataNodeManager_CheckHealth_Call
type MockDataNodeManager_Close_Call ¶
MockDataNodeManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockDataNodeManager_Close_Call) Return ¶
func (_c *MockDataNodeManager_Close_Call) Return() *MockDataNodeManager_Close_Call
func (*MockDataNodeManager_Close_Call) Run ¶
func (_c *MockDataNodeManager_Close_Call) Run(run func()) *MockDataNodeManager_Close_Call
func (*MockDataNodeManager_Close_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_Close_Call) RunAndReturn(run func()) *MockDataNodeManager_Close_Call
type MockDataNodeManager_Compaction_Call ¶
MockDataNodeManager_Compaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compaction'
func (*MockDataNodeManager_Compaction_Call) Return ¶
func (_c *MockDataNodeManager_Compaction_Call) Return(_a0 error) *MockDataNodeManager_Compaction_Call
func (*MockDataNodeManager_Compaction_Call) Run ¶
func (_c *MockDataNodeManager_Compaction_Call) Run(run func(ctx context.Context, nodeID int64, plan *datapb.CompactionPlan)) *MockDataNodeManager_Compaction_Call
func (*MockDataNodeManager_Compaction_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_Compaction_Call) RunAndReturn(run func(context.Context, int64, *datapb.CompactionPlan) error) *MockDataNodeManager_Compaction_Call
type MockDataNodeManager_DeleteSession_Call ¶
MockDataNodeManager_DeleteSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSession'
func (*MockDataNodeManager_DeleteSession_Call) Return ¶
func (_c *MockDataNodeManager_DeleteSession_Call) Return() *MockDataNodeManager_DeleteSession_Call
func (*MockDataNodeManager_DeleteSession_Call) Run ¶
func (_c *MockDataNodeManager_DeleteSession_Call) Run(run func(node *NodeInfo)) *MockDataNodeManager_DeleteSession_Call
func (*MockDataNodeManager_DeleteSession_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_DeleteSession_Call) RunAndReturn(run func(*NodeInfo)) *MockDataNodeManager_DeleteSession_Call
type MockDataNodeManager_DropCompactionPlan_Call ¶
MockDataNodeManager_DropCompactionPlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropCompactionPlan'
func (*MockDataNodeManager_DropCompactionPlan_Call) Return ¶
func (_c *MockDataNodeManager_DropCompactionPlan_Call) Return(_a0 error) *MockDataNodeManager_DropCompactionPlan_Call
func (*MockDataNodeManager_DropCompactionPlan_Call) Run ¶
func (_c *MockDataNodeManager_DropCompactionPlan_Call) Run(run func(nodeID int64, req *datapb.DropCompactionPlanRequest)) *MockDataNodeManager_DropCompactionPlan_Call
func (*MockDataNodeManager_DropCompactionPlan_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_DropCompactionPlan_Call) RunAndReturn(run func(int64, *datapb.DropCompactionPlanRequest) error) *MockDataNodeManager_DropCompactionPlan_Call
type MockDataNodeManager_DropImport_Call ¶
MockDataNodeManager_DropImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropImport'
func (*MockDataNodeManager_DropImport_Call) Return ¶
func (_c *MockDataNodeManager_DropImport_Call) Return(_a0 error) *MockDataNodeManager_DropImport_Call
func (*MockDataNodeManager_DropImport_Call) Run ¶
func (_c *MockDataNodeManager_DropImport_Call) Run(run func(nodeID int64, in *datapb.DropImportRequest)) *MockDataNodeManager_DropImport_Call
func (*MockDataNodeManager_DropImport_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_DropImport_Call) RunAndReturn(run func(int64, *datapb.DropImportRequest) error) *MockDataNodeManager_DropImport_Call
type MockDataNodeManager_Expecter ¶
type MockDataNodeManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockDataNodeManager_Expecter) AddSession ¶
func (_e *MockDataNodeManager_Expecter) AddSession(node interface{}) *MockDataNodeManager_AddSession_Call
AddSession is a helper method to define mock.On call
- node *NodeInfo
func (*MockDataNodeManager_Expecter) CheckChannelOperationProgress ¶
func (_e *MockDataNodeManager_Expecter) CheckChannelOperationProgress(ctx interface{}, nodeID interface{}, info interface{}) *MockDataNodeManager_CheckChannelOperationProgress_Call
CheckChannelOperationProgress is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- info *datapb.ChannelWatchInfo
func (*MockDataNodeManager_Expecter) CheckHealth ¶
func (_e *MockDataNodeManager_Expecter) CheckHealth(ctx interface{}) *MockDataNodeManager_CheckHealth_Call
CheckHealth is a helper method to define mock.On call
- ctx context.Context
func (*MockDataNodeManager_Expecter) Close ¶
func (_e *MockDataNodeManager_Expecter) Close() *MockDataNodeManager_Close_Call
Close is a helper method to define mock.On call
func (*MockDataNodeManager_Expecter) Compaction ¶
func (_e *MockDataNodeManager_Expecter) Compaction(ctx interface{}, nodeID interface{}, plan interface{}) *MockDataNodeManager_Compaction_Call
Compaction is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- plan *datapb.CompactionPlan
func (*MockDataNodeManager_Expecter) DeleteSession ¶
func (_e *MockDataNodeManager_Expecter) DeleteSession(node interface{}) *MockDataNodeManager_DeleteSession_Call
DeleteSession is a helper method to define mock.On call
- node *NodeInfo
func (*MockDataNodeManager_Expecter) DropCompactionPlan ¶
func (_e *MockDataNodeManager_Expecter) DropCompactionPlan(nodeID interface{}, req interface{}) *MockDataNodeManager_DropCompactionPlan_Call
DropCompactionPlan is a helper method to define mock.On call
- nodeID int64
- req *datapb.DropCompactionPlanRequest
func (*MockDataNodeManager_Expecter) DropImport ¶
func (_e *MockDataNodeManager_Expecter) DropImport(nodeID interface{}, in interface{}) *MockDataNodeManager_DropImport_Call
DropImport is a helper method to define mock.On call
- nodeID int64
- in *datapb.DropImportRequest
func (*MockDataNodeManager_Expecter) Flush ¶
func (_e *MockDataNodeManager_Expecter) Flush(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_Flush_Call
Flush is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *datapb.FlushSegmentsRequest
func (*MockDataNodeManager_Expecter) FlushChannels ¶
func (_e *MockDataNodeManager_Expecter) FlushChannels(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_FlushChannels_Call
FlushChannels is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *datapb.FlushChannelsRequest
func (*MockDataNodeManager_Expecter) GetCompactionPlanResult ¶
func (_e *MockDataNodeManager_Expecter) GetCompactionPlanResult(nodeID interface{}, planID interface{}) *MockDataNodeManager_GetCompactionPlanResult_Call
GetCompactionPlanResult is a helper method to define mock.On call
- nodeID int64
- planID int64
func (*MockDataNodeManager_Expecter) GetCompactionPlansResults ¶
func (_e *MockDataNodeManager_Expecter) GetCompactionPlansResults() *MockDataNodeManager_GetCompactionPlansResults_Call
GetCompactionPlansResults is a helper method to define mock.On call
func (*MockDataNodeManager_Expecter) GetSession ¶
func (_e *MockDataNodeManager_Expecter) GetSession(_a0 interface{}) *MockDataNodeManager_GetSession_Call
GetSession is a helper method to define mock.On call
- _a0 int64
func (*MockDataNodeManager_Expecter) GetSessionIDs ¶
func (_e *MockDataNodeManager_Expecter) GetSessionIDs() *MockDataNodeManager_GetSessionIDs_Call
GetSessionIDs is a helper method to define mock.On call
func (*MockDataNodeManager_Expecter) GetSessions ¶
func (_e *MockDataNodeManager_Expecter) GetSessions() *MockDataNodeManager_GetSessions_Call
GetSessions is a helper method to define mock.On call
func (*MockDataNodeManager_Expecter) ImportV2 ¶
func (_e *MockDataNodeManager_Expecter) ImportV2(nodeID interface{}, in interface{}) *MockDataNodeManager_ImportV2_Call
ImportV2 is a helper method to define mock.On call
- nodeID int64
- in *datapb.ImportRequest
func (*MockDataNodeManager_Expecter) NotifyChannelOperation ¶
func (_e *MockDataNodeManager_Expecter) NotifyChannelOperation(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_NotifyChannelOperation_Call
NotifyChannelOperation is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *datapb.ChannelOperationsRequest
func (*MockDataNodeManager_Expecter) PreImport ¶
func (_e *MockDataNodeManager_Expecter) PreImport(nodeID interface{}, in interface{}) *MockDataNodeManager_PreImport_Call
PreImport is a helper method to define mock.On call
- nodeID int64
- in *datapb.PreImportRequest
func (*MockDataNodeManager_Expecter) QueryImport ¶
func (_e *MockDataNodeManager_Expecter) QueryImport(nodeID interface{}, in interface{}) *MockDataNodeManager_QueryImport_Call
QueryImport is a helper method to define mock.On call
- nodeID int64
- in *datapb.QueryImportRequest
func (*MockDataNodeManager_Expecter) QueryPreImport ¶
func (_e *MockDataNodeManager_Expecter) QueryPreImport(nodeID interface{}, in interface{}) *MockDataNodeManager_QueryPreImport_Call
QueryPreImport is a helper method to define mock.On call
- nodeID int64
- in *datapb.QueryPreImportRequest
func (*MockDataNodeManager_Expecter) QuerySlot ¶
func (_e *MockDataNodeManager_Expecter) QuerySlot(nodeID interface{}) *MockDataNodeManager_QuerySlot_Call
QuerySlot is a helper method to define mock.On call
- nodeID int64
func (*MockDataNodeManager_Expecter) SyncSegments ¶
func (_e *MockDataNodeManager_Expecter) SyncSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockDataNodeManager_SyncSegments_Call
SyncSegments is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *datapb.SyncSegmentsRequest
type MockDataNodeManager_FlushChannels_Call ¶
MockDataNodeManager_FlushChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FlushChannels'
func (*MockDataNodeManager_FlushChannels_Call) Return ¶
func (_c *MockDataNodeManager_FlushChannels_Call) Return(_a0 error) *MockDataNodeManager_FlushChannels_Call
func (*MockDataNodeManager_FlushChannels_Call) Run ¶
func (_c *MockDataNodeManager_FlushChannels_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.FlushChannelsRequest)) *MockDataNodeManager_FlushChannels_Call
func (*MockDataNodeManager_FlushChannels_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_FlushChannels_Call) RunAndReturn(run func(context.Context, int64, *datapb.FlushChannelsRequest) error) *MockDataNodeManager_FlushChannels_Call
type MockDataNodeManager_Flush_Call ¶
MockDataNodeManager_Flush_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Flush'
func (*MockDataNodeManager_Flush_Call) Return ¶
func (_c *MockDataNodeManager_Flush_Call) Return() *MockDataNodeManager_Flush_Call
func (*MockDataNodeManager_Flush_Call) Run ¶
func (_c *MockDataNodeManager_Flush_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.FlushSegmentsRequest)) *MockDataNodeManager_Flush_Call
func (*MockDataNodeManager_Flush_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_Flush_Call) RunAndReturn(run func(context.Context, int64, *datapb.FlushSegmentsRequest)) *MockDataNodeManager_Flush_Call
type MockDataNodeManager_GetCompactionPlanResult_Call ¶
MockDataNodeManager_GetCompactionPlanResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompactionPlanResult'
func (*MockDataNodeManager_GetCompactionPlanResult_Call) Return ¶
func (_c *MockDataNodeManager_GetCompactionPlanResult_Call) Return(_a0 *datapb.CompactionPlanResult, _a1 error) *MockDataNodeManager_GetCompactionPlanResult_Call
func (*MockDataNodeManager_GetCompactionPlanResult_Call) Run ¶
func (_c *MockDataNodeManager_GetCompactionPlanResult_Call) Run(run func(nodeID int64, planID int64)) *MockDataNodeManager_GetCompactionPlanResult_Call
func (*MockDataNodeManager_GetCompactionPlanResult_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_GetCompactionPlanResult_Call) RunAndReturn(run func(int64, int64) (*datapb.CompactionPlanResult, error)) *MockDataNodeManager_GetCompactionPlanResult_Call
type MockDataNodeManager_GetCompactionPlansResults_Call ¶
MockDataNodeManager_GetCompactionPlansResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCompactionPlansResults'
func (*MockDataNodeManager_GetCompactionPlansResults_Call) Return ¶
func (_c *MockDataNodeManager_GetCompactionPlansResults_Call) Return(_a0 map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], _a1 error) *MockDataNodeManager_GetCompactionPlansResults_Call
func (*MockDataNodeManager_GetCompactionPlansResults_Call) Run ¶
func (_c *MockDataNodeManager_GetCompactionPlansResults_Call) Run(run func()) *MockDataNodeManager_GetCompactionPlansResults_Call
func (*MockDataNodeManager_GetCompactionPlansResults_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_GetCompactionPlansResults_Call) RunAndReturn(run func() (map[int64]*typeutil.Pair[int64, *datapb.CompactionPlanResult], error)) *MockDataNodeManager_GetCompactionPlansResults_Call
type MockDataNodeManager_GetSessionIDs_Call ¶
MockDataNodeManager_GetSessionIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionIDs'
func (*MockDataNodeManager_GetSessionIDs_Call) Return ¶
func (_c *MockDataNodeManager_GetSessionIDs_Call) Return(_a0 []int64) *MockDataNodeManager_GetSessionIDs_Call
func (*MockDataNodeManager_GetSessionIDs_Call) Run ¶
func (_c *MockDataNodeManager_GetSessionIDs_Call) Run(run func()) *MockDataNodeManager_GetSessionIDs_Call
func (*MockDataNodeManager_GetSessionIDs_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_GetSessionIDs_Call) RunAndReturn(run func() []int64) *MockDataNodeManager_GetSessionIDs_Call
type MockDataNodeManager_GetSession_Call ¶
MockDataNodeManager_GetSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSession'
func (*MockDataNodeManager_GetSession_Call) Return ¶
func (_c *MockDataNodeManager_GetSession_Call) Return(_a0 *Session, _a1 bool) *MockDataNodeManager_GetSession_Call
func (*MockDataNodeManager_GetSession_Call) Run ¶
func (_c *MockDataNodeManager_GetSession_Call) Run(run func(_a0 int64)) *MockDataNodeManager_GetSession_Call
func (*MockDataNodeManager_GetSession_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_GetSession_Call) RunAndReturn(run func(int64) (*Session, bool)) *MockDataNodeManager_GetSession_Call
type MockDataNodeManager_GetSessions_Call ¶
MockDataNodeManager_GetSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessions'
func (*MockDataNodeManager_GetSessions_Call) Return ¶
func (_c *MockDataNodeManager_GetSessions_Call) Return(_a0 []*Session) *MockDataNodeManager_GetSessions_Call
func (*MockDataNodeManager_GetSessions_Call) Run ¶
func (_c *MockDataNodeManager_GetSessions_Call) Run(run func()) *MockDataNodeManager_GetSessions_Call
func (*MockDataNodeManager_GetSessions_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_GetSessions_Call) RunAndReturn(run func() []*Session) *MockDataNodeManager_GetSessions_Call
type MockDataNodeManager_ImportV2_Call ¶
MockDataNodeManager_ImportV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ImportV2'
func (*MockDataNodeManager_ImportV2_Call) Return ¶
func (_c *MockDataNodeManager_ImportV2_Call) Return(_a0 error) *MockDataNodeManager_ImportV2_Call
func (*MockDataNodeManager_ImportV2_Call) Run ¶
func (_c *MockDataNodeManager_ImportV2_Call) Run(run func(nodeID int64, in *datapb.ImportRequest)) *MockDataNodeManager_ImportV2_Call
func (*MockDataNodeManager_ImportV2_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_ImportV2_Call) RunAndReturn(run func(int64, *datapb.ImportRequest) error) *MockDataNodeManager_ImportV2_Call
type MockDataNodeManager_NotifyChannelOperation_Call ¶
MockDataNodeManager_NotifyChannelOperation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NotifyChannelOperation'
func (*MockDataNodeManager_NotifyChannelOperation_Call) Return ¶
func (_c *MockDataNodeManager_NotifyChannelOperation_Call) Return(_a0 error) *MockDataNodeManager_NotifyChannelOperation_Call
func (*MockDataNodeManager_NotifyChannelOperation_Call) Run ¶
func (_c *MockDataNodeManager_NotifyChannelOperation_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.ChannelOperationsRequest)) *MockDataNodeManager_NotifyChannelOperation_Call
func (*MockDataNodeManager_NotifyChannelOperation_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_NotifyChannelOperation_Call) RunAndReturn(run func(context.Context, int64, *datapb.ChannelOperationsRequest) error) *MockDataNodeManager_NotifyChannelOperation_Call
type MockDataNodeManager_PreImport_Call ¶
MockDataNodeManager_PreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PreImport'
func (*MockDataNodeManager_PreImport_Call) Return ¶
func (_c *MockDataNodeManager_PreImport_Call) Return(_a0 error) *MockDataNodeManager_PreImport_Call
func (*MockDataNodeManager_PreImport_Call) Run ¶
func (_c *MockDataNodeManager_PreImport_Call) Run(run func(nodeID int64, in *datapb.PreImportRequest)) *MockDataNodeManager_PreImport_Call
func (*MockDataNodeManager_PreImport_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_PreImport_Call) RunAndReturn(run func(int64, *datapb.PreImportRequest) error) *MockDataNodeManager_PreImport_Call
type MockDataNodeManager_QueryImport_Call ¶
MockDataNodeManager_QueryImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryImport'
func (*MockDataNodeManager_QueryImport_Call) Return ¶
func (_c *MockDataNodeManager_QueryImport_Call) Return(_a0 *datapb.QueryImportResponse, _a1 error) *MockDataNodeManager_QueryImport_Call
func (*MockDataNodeManager_QueryImport_Call) Run ¶
func (_c *MockDataNodeManager_QueryImport_Call) Run(run func(nodeID int64, in *datapb.QueryImportRequest)) *MockDataNodeManager_QueryImport_Call
func (*MockDataNodeManager_QueryImport_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_QueryImport_Call) RunAndReturn(run func(int64, *datapb.QueryImportRequest) (*datapb.QueryImportResponse, error)) *MockDataNodeManager_QueryImport_Call
type MockDataNodeManager_QueryPreImport_Call ¶
MockDataNodeManager_QueryPreImport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryPreImport'
func (*MockDataNodeManager_QueryPreImport_Call) Return ¶
func (_c *MockDataNodeManager_QueryPreImport_Call) Return(_a0 *datapb.QueryPreImportResponse, _a1 error) *MockDataNodeManager_QueryPreImport_Call
func (*MockDataNodeManager_QueryPreImport_Call) Run ¶
func (_c *MockDataNodeManager_QueryPreImport_Call) Run(run func(nodeID int64, in *datapb.QueryPreImportRequest)) *MockDataNodeManager_QueryPreImport_Call
func (*MockDataNodeManager_QueryPreImport_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_QueryPreImport_Call) RunAndReturn(run func(int64, *datapb.QueryPreImportRequest) (*datapb.QueryPreImportResponse, error)) *MockDataNodeManager_QueryPreImport_Call
type MockDataNodeManager_QuerySlot_Call ¶
MockDataNodeManager_QuerySlot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QuerySlot'
func (*MockDataNodeManager_QuerySlot_Call) Return ¶
func (_c *MockDataNodeManager_QuerySlot_Call) Return(_a0 *datapb.QuerySlotResponse, _a1 error) *MockDataNodeManager_QuerySlot_Call
func (*MockDataNodeManager_QuerySlot_Call) Run ¶
func (_c *MockDataNodeManager_QuerySlot_Call) Run(run func(nodeID int64)) *MockDataNodeManager_QuerySlot_Call
func (*MockDataNodeManager_QuerySlot_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_QuerySlot_Call) RunAndReturn(run func(int64) (*datapb.QuerySlotResponse, error)) *MockDataNodeManager_QuerySlot_Call
type MockDataNodeManager_SyncSegments_Call ¶
MockDataNodeManager_SyncSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncSegments'
func (*MockDataNodeManager_SyncSegments_Call) Return ¶
func (_c *MockDataNodeManager_SyncSegments_Call) Return(_a0 error) *MockDataNodeManager_SyncSegments_Call
func (*MockDataNodeManager_SyncSegments_Call) Run ¶
func (_c *MockDataNodeManager_SyncSegments_Call) Run(run func(ctx context.Context, nodeID int64, req *datapb.SyncSegmentsRequest)) *MockDataNodeManager_SyncSegments_Call
func (*MockDataNodeManager_SyncSegments_Call) RunAndReturn ¶
func (_c *MockDataNodeManager_SyncSegments_Call) RunAndReturn(run func(context.Context, int64, *datapb.SyncSegmentsRequest) error) *MockDataNodeManager_SyncSegments_Call
type MockWorkerManager ¶
MockWorkerManager is an autogenerated mock type for the WorkerManager type
func NewMockWorkerManager ¶
func NewMockWorkerManager(t interface { mock.TestingT Cleanup(func()) }) *MockWorkerManager
NewMockWorkerManager creates a new instance of MockWorkerManager. 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 (*MockWorkerManager) AddNode ¶
func (_m *MockWorkerManager) AddNode(nodeID int64, address string) error
AddNode provides a mock function with given fields: nodeID, address
func (*MockWorkerManager) ClientSupportDisk ¶
func (_m *MockWorkerManager) ClientSupportDisk() bool
ClientSupportDisk provides a mock function with given fields:
func (*MockWorkerManager) EXPECT ¶
func (_m *MockWorkerManager) EXPECT() *MockWorkerManager_Expecter
func (*MockWorkerManager) GetAllClients ¶
func (_m *MockWorkerManager) GetAllClients() map[int64]types.IndexNodeClient
GetAllClients provides a mock function with given fields:
func (*MockWorkerManager) GetClientByID ¶
func (_m *MockWorkerManager) GetClientByID(nodeID int64) (types.IndexNodeClient, bool)
GetClientByID provides a mock function with given fields: nodeID
func (*MockWorkerManager) PickClient ¶
func (_m *MockWorkerManager) PickClient() (int64, types.IndexNodeClient)
PickClient provides a mock function with given fields:
func (*MockWorkerManager) RemoveNode ¶
func (_m *MockWorkerManager) RemoveNode(nodeID int64)
RemoveNode provides a mock function with given fields: nodeID
func (*MockWorkerManager) StoppingNode ¶
func (_m *MockWorkerManager) StoppingNode(nodeID int64)
StoppingNode provides a mock function with given fields: nodeID
type MockWorkerManager_AddNode_Call ¶
MockWorkerManager_AddNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNode'
func (*MockWorkerManager_AddNode_Call) Return ¶
func (_c *MockWorkerManager_AddNode_Call) Return(_a0 error) *MockWorkerManager_AddNode_Call
func (*MockWorkerManager_AddNode_Call) Run ¶
func (_c *MockWorkerManager_AddNode_Call) Run(run func(nodeID int64, address string)) *MockWorkerManager_AddNode_Call
func (*MockWorkerManager_AddNode_Call) RunAndReturn ¶
func (_c *MockWorkerManager_AddNode_Call) RunAndReturn(run func(int64, string) error) *MockWorkerManager_AddNode_Call
type MockWorkerManager_ClientSupportDisk_Call ¶
MockWorkerManager_ClientSupportDisk_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientSupportDisk'
func (*MockWorkerManager_ClientSupportDisk_Call) Return ¶
func (_c *MockWorkerManager_ClientSupportDisk_Call) Return(_a0 bool) *MockWorkerManager_ClientSupportDisk_Call
func (*MockWorkerManager_ClientSupportDisk_Call) Run ¶
func (_c *MockWorkerManager_ClientSupportDisk_Call) Run(run func()) *MockWorkerManager_ClientSupportDisk_Call
func (*MockWorkerManager_ClientSupportDisk_Call) RunAndReturn ¶
func (_c *MockWorkerManager_ClientSupportDisk_Call) RunAndReturn(run func() bool) *MockWorkerManager_ClientSupportDisk_Call
type MockWorkerManager_Expecter ¶
type MockWorkerManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockWorkerManager_Expecter) AddNode ¶
func (_e *MockWorkerManager_Expecter) AddNode(nodeID interface{}, address interface{}) *MockWorkerManager_AddNode_Call
AddNode is a helper method to define mock.On call
- nodeID int64
- address string
func (*MockWorkerManager_Expecter) ClientSupportDisk ¶
func (_e *MockWorkerManager_Expecter) ClientSupportDisk() *MockWorkerManager_ClientSupportDisk_Call
ClientSupportDisk is a helper method to define mock.On call
func (*MockWorkerManager_Expecter) GetAllClients ¶
func (_e *MockWorkerManager_Expecter) GetAllClients() *MockWorkerManager_GetAllClients_Call
GetAllClients is a helper method to define mock.On call
func (*MockWorkerManager_Expecter) GetClientByID ¶
func (_e *MockWorkerManager_Expecter) GetClientByID(nodeID interface{}) *MockWorkerManager_GetClientByID_Call
GetClientByID is a helper method to define mock.On call
- nodeID int64
func (*MockWorkerManager_Expecter) PickClient ¶
func (_e *MockWorkerManager_Expecter) PickClient() *MockWorkerManager_PickClient_Call
PickClient is a helper method to define mock.On call
func (*MockWorkerManager_Expecter) RemoveNode ¶
func (_e *MockWorkerManager_Expecter) RemoveNode(nodeID interface{}) *MockWorkerManager_RemoveNode_Call
RemoveNode is a helper method to define mock.On call
- nodeID int64
func (*MockWorkerManager_Expecter) StoppingNode ¶
func (_e *MockWorkerManager_Expecter) StoppingNode(nodeID interface{}) *MockWorkerManager_StoppingNode_Call
StoppingNode is a helper method to define mock.On call
- nodeID int64
type MockWorkerManager_GetAllClients_Call ¶
MockWorkerManager_GetAllClients_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllClients'
func (*MockWorkerManager_GetAllClients_Call) Return ¶
func (_c *MockWorkerManager_GetAllClients_Call) Return(_a0 map[int64]types.IndexNodeClient) *MockWorkerManager_GetAllClients_Call
func (*MockWorkerManager_GetAllClients_Call) Run ¶
func (_c *MockWorkerManager_GetAllClients_Call) Run(run func()) *MockWorkerManager_GetAllClients_Call
func (*MockWorkerManager_GetAllClients_Call) RunAndReturn ¶
func (_c *MockWorkerManager_GetAllClients_Call) RunAndReturn(run func() map[int64]types.IndexNodeClient) *MockWorkerManager_GetAllClients_Call
type MockWorkerManager_GetClientByID_Call ¶
MockWorkerManager_GetClientByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClientByID'
func (*MockWorkerManager_GetClientByID_Call) Return ¶
func (_c *MockWorkerManager_GetClientByID_Call) Return(_a0 types.IndexNodeClient, _a1 bool) *MockWorkerManager_GetClientByID_Call
func (*MockWorkerManager_GetClientByID_Call) Run ¶
func (_c *MockWorkerManager_GetClientByID_Call) Run(run func(nodeID int64)) *MockWorkerManager_GetClientByID_Call
func (*MockWorkerManager_GetClientByID_Call) RunAndReturn ¶
func (_c *MockWorkerManager_GetClientByID_Call) RunAndReturn(run func(int64) (types.IndexNodeClient, bool)) *MockWorkerManager_GetClientByID_Call
type MockWorkerManager_PickClient_Call ¶
MockWorkerManager_PickClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PickClient'
func (*MockWorkerManager_PickClient_Call) Return ¶
func (_c *MockWorkerManager_PickClient_Call) Return(_a0 int64, _a1 types.IndexNodeClient) *MockWorkerManager_PickClient_Call
func (*MockWorkerManager_PickClient_Call) Run ¶
func (_c *MockWorkerManager_PickClient_Call) Run(run func()) *MockWorkerManager_PickClient_Call
func (*MockWorkerManager_PickClient_Call) RunAndReturn ¶
func (_c *MockWorkerManager_PickClient_Call) RunAndReturn(run func() (int64, types.IndexNodeClient)) *MockWorkerManager_PickClient_Call
type MockWorkerManager_RemoveNode_Call ¶
MockWorkerManager_RemoveNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveNode'
func (*MockWorkerManager_RemoveNode_Call) Return ¶
func (_c *MockWorkerManager_RemoveNode_Call) Return() *MockWorkerManager_RemoveNode_Call
func (*MockWorkerManager_RemoveNode_Call) Run ¶
func (_c *MockWorkerManager_RemoveNode_Call) Run(run func(nodeID int64)) *MockWorkerManager_RemoveNode_Call
func (*MockWorkerManager_RemoveNode_Call) RunAndReturn ¶
func (_c *MockWorkerManager_RemoveNode_Call) RunAndReturn(run func(int64)) *MockWorkerManager_RemoveNode_Call
type MockWorkerManager_StoppingNode_Call ¶
MockWorkerManager_StoppingNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoppingNode'
func (*MockWorkerManager_StoppingNode_Call) Return ¶
func (_c *MockWorkerManager_StoppingNode_Call) Return() *MockWorkerManager_StoppingNode_Call
func (*MockWorkerManager_StoppingNode_Call) Run ¶
func (_c *MockWorkerManager_StoppingNode_Call) Run(run func(nodeID int64)) *MockWorkerManager_StoppingNode_Call
func (*MockWorkerManager_StoppingNode_Call) RunAndReturn ¶
func (_c *MockWorkerManager_StoppingNode_Call) RunAndReturn(run func(int64)) *MockWorkerManager_StoppingNode_Call
type Session ¶
Session contains session info of a node
func NewSession ¶
func NewSession(info *NodeInfo, creator DataNodeCreatorFunc) *Session
NewSession creates a new session
func (*Session) Address ¶
Address returns address of session internal node info. If internal info is nil, return empty string instead.
func (*Session) GetOrCreateClient ¶
GetOrCreateClient gets or creates a new client for session
type SessionOpt ¶
type SessionOpt func(c *DataNodeManagerImpl)
SessionOpt provides a way to set params in SessionManagerImpl
func WithDataNodeCreator ¶
func WithDataNodeCreator(creator DataNodeCreatorFunc) SessionOpt
type WorkerManager ¶
type WorkerManager interface { AddNode(nodeID typeutil.UniqueID, address string) error RemoveNode(nodeID typeutil.UniqueID) StoppingNode(nodeID typeutil.UniqueID) PickClient() (typeutil.UniqueID, types.IndexNodeClient) ClientSupportDisk() bool GetAllClients() map[typeutil.UniqueID]types.IndexNodeClient GetClientByID(nodeID typeutil.UniqueID) (types.IndexNodeClient, bool) }