Documentation
¶
Index ¶
- Variables
- type FSMUpdater
- type Manager
- type MockFSMUpdater
- func (_m *MockFSMUpdater) DeleteReplicaFromShard(ctx context.Context, collection string, shard string, nodeId string) (uint64, error)
- func (_m *MockFSMUpdater) EXPECT() *MockFSMUpdater_Expecter
- func (_m *MockFSMUpdater) ReplicationAddReplicaToShard(ctx context.Context, collection string, shard string, nodeId string, ...) (uint64, error)
- func (_m *MockFSMUpdater) ReplicationCancellationComplete(ctx context.Context, id uint64) error
- func (_m *MockFSMUpdater) ReplicationGetReplicaOpStatus(ctx context.Context, id uint64) (api.ShardReplicationState, error)
- func (_m *MockFSMUpdater) ReplicationRegisterError(ctx context.Context, id uint64, errorToRegister string) error
- func (_m *MockFSMUpdater) ReplicationRemoveReplicaOp(ctx context.Context, id uint64) error
- func (_m *MockFSMUpdater) ReplicationStoreSchemaVersion(ctx context.Context, id uint64, schemaVersion uint64) error
- func (_m *MockFSMUpdater) ReplicationUpdateReplicaOpStatus(ctx context.Context, id uint64, state api.ShardReplicationState) error
- func (_m *MockFSMUpdater) SyncShard(ctx context.Context, collection string, shard string, nodeId string) (uint64, error)
- func (_m *MockFSMUpdater) UpdateTenants(ctx context.Context, class string, req *api.UpdateTenantsRequest) (uint64, error)
- func (_m *MockFSMUpdater) WaitForUpdate(ctx context.Context, schemaVersion uint64) error
- type MockFSMUpdater_DeleteReplicaFromShard_Call
- func (_c *MockFSMUpdater_DeleteReplicaFromShard_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_DeleteReplicaFromShard_Call
- func (_c *MockFSMUpdater_DeleteReplicaFromShard_Call) Run(run func(ctx context.Context, collection string, shard string, nodeId string)) *MockFSMUpdater_DeleteReplicaFromShard_Call
- func (_c *MockFSMUpdater_DeleteReplicaFromShard_Call) RunAndReturn(run func(context.Context, string, string, string) (uint64, error)) *MockFSMUpdater_DeleteReplicaFromShard_Call
- type MockFSMUpdater_Expecter
- func (_e *MockFSMUpdater_Expecter) DeleteReplicaFromShard(ctx interface{}, collection interface{}, shard interface{}, nodeId interface{}) *MockFSMUpdater_DeleteReplicaFromShard_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationAddReplicaToShard(ctx interface{}, collection interface{}, shard interface{}, nodeId interface{}, ...) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationCancellationComplete(ctx interface{}, id interface{}) *MockFSMUpdater_ReplicationCancellationComplete_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationGetReplicaOpStatus(ctx interface{}, id interface{}) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationRegisterError(ctx interface{}, id interface{}, errorToRegister interface{}) *MockFSMUpdater_ReplicationRegisterError_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationRemoveReplicaOp(ctx interface{}, id interface{}) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationStoreSchemaVersion(ctx interface{}, id interface{}, schemaVersion interface{}) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
- func (_e *MockFSMUpdater_Expecter) ReplicationUpdateReplicaOpStatus(ctx interface{}, id interface{}, state interface{}) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
- func (_e *MockFSMUpdater_Expecter) SyncShard(ctx interface{}, collection interface{}, shard interface{}, nodeId interface{}) *MockFSMUpdater_SyncShard_Call
- func (_e *MockFSMUpdater_Expecter) UpdateTenants(ctx interface{}, class interface{}, req interface{}) *MockFSMUpdater_UpdateTenants_Call
- func (_e *MockFSMUpdater_Expecter) WaitForUpdate(ctx interface{}, schemaVersion interface{}) *MockFSMUpdater_WaitForUpdate_Call
- type MockFSMUpdater_ReplicationAddReplicaToShard_Call
- func (_c *MockFSMUpdater_ReplicationAddReplicaToShard_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
- func (_c *MockFSMUpdater_ReplicationAddReplicaToShard_Call) Run(...) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
- func (_c *MockFSMUpdater_ReplicationAddReplicaToShard_Call) RunAndReturn(run func(context.Context, string, string, string, uint64) (uint64, error)) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
- type MockFSMUpdater_ReplicationCancellationComplete_Call
- func (_c *MockFSMUpdater_ReplicationCancellationComplete_Call) Return(_a0 error) *MockFSMUpdater_ReplicationCancellationComplete_Call
- func (_c *MockFSMUpdater_ReplicationCancellationComplete_Call) Run(run func(ctx context.Context, id uint64)) *MockFSMUpdater_ReplicationCancellationComplete_Call
- func (_c *MockFSMUpdater_ReplicationCancellationComplete_Call) RunAndReturn(run func(context.Context, uint64) error) *MockFSMUpdater_ReplicationCancellationComplete_Call
- type MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
- func (_c *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Return(_a0 api.ShardReplicationState, _a1 error) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
- func (_c *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Run(run func(ctx context.Context, id uint64)) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
- func (_c *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) RunAndReturn(run func(context.Context, uint64) (api.ShardReplicationState, error)) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
- type MockFSMUpdater_ReplicationRegisterError_Call
- func (_c *MockFSMUpdater_ReplicationRegisterError_Call) Return(_a0 error) *MockFSMUpdater_ReplicationRegisterError_Call
- func (_c *MockFSMUpdater_ReplicationRegisterError_Call) Run(run func(ctx context.Context, id uint64, errorToRegister string)) *MockFSMUpdater_ReplicationRegisterError_Call
- func (_c *MockFSMUpdater_ReplicationRegisterError_Call) RunAndReturn(run func(context.Context, uint64, string) error) *MockFSMUpdater_ReplicationRegisterError_Call
- type MockFSMUpdater_ReplicationRemoveReplicaOp_Call
- func (_c *MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Return(_a0 error) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
- func (_c *MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Run(run func(ctx context.Context, id uint64)) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
- func (_c *MockFSMUpdater_ReplicationRemoveReplicaOp_Call) RunAndReturn(run func(context.Context, uint64) error) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
- type MockFSMUpdater_ReplicationStoreSchemaVersion_Call
- func (_c *MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Return(_a0 error) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
- func (_c *MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Run(run func(ctx context.Context, id uint64, schemaVersion uint64)) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
- func (_c *MockFSMUpdater_ReplicationStoreSchemaVersion_Call) RunAndReturn(run func(context.Context, uint64, uint64) error) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
- type MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
- func (_c *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) Return(_a0 error) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
- func (_c *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) Run(run func(ctx context.Context, id uint64, state api.ShardReplicationState)) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
- func (_c *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) RunAndReturn(run func(context.Context, uint64, api.ShardReplicationState) error) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
- type MockFSMUpdater_SyncShard_Call
- func (_c *MockFSMUpdater_SyncShard_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_SyncShard_Call
- func (_c *MockFSMUpdater_SyncShard_Call) Run(run func(ctx context.Context, collection string, shard string, nodeId string)) *MockFSMUpdater_SyncShard_Call
- func (_c *MockFSMUpdater_SyncShard_Call) RunAndReturn(run func(context.Context, string, string, string) (uint64, error)) *MockFSMUpdater_SyncShard_Call
- type MockFSMUpdater_UpdateTenants_Call
- func (_c *MockFSMUpdater_UpdateTenants_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_UpdateTenants_Call
- func (_c *MockFSMUpdater_UpdateTenants_Call) Run(run func(ctx context.Context, class string, req *api.UpdateTenantsRequest)) *MockFSMUpdater_UpdateTenants_Call
- func (_c *MockFSMUpdater_UpdateTenants_Call) RunAndReturn(run func(context.Context, string, *api.UpdateTenantsRequest) (uint64, error)) *MockFSMUpdater_UpdateTenants_Call
- type MockFSMUpdater_WaitForUpdate_Call
- func (_c *MockFSMUpdater_WaitForUpdate_Call) Return(_a0 error) *MockFSMUpdater_WaitForUpdate_Call
- func (_c *MockFSMUpdater_WaitForUpdate_Call) Run(run func(ctx context.Context, schemaVersion uint64)) *MockFSMUpdater_WaitForUpdate_Call
- func (_c *MockFSMUpdater_WaitForUpdate_Call) RunAndReturn(run func(context.Context, uint64) error) *MockFSMUpdater_WaitForUpdate_Call
- type MockManager
- func (_m *MockManager) ApplyReplicationScalePlan(ctx context.Context, scalePlan api.ReplicationScalePlan) ([]strfmt.UUID, error)
- func (_m *MockManager) CancelReplication(ctx context.Context, uuid strfmt.UUID) error
- func (_m *MockManager) DeleteAllReplications(ctx context.Context) error
- func (_m *MockManager) DeleteReplication(ctx context.Context, uuid strfmt.UUID) error
- func (_m *MockManager) DeleteReplicationsByCollection(ctx context.Context, collection string) error
- func (_m *MockManager) DeleteReplicationsByTenants(ctx context.Context, collection string, tenants []string) error
- func (_m *MockManager) EXPECT() *MockManager_Expecter
- func (_m *MockManager) ForceDeleteAllReplications(ctx context.Context) error
- func (_m *MockManager) ForceDeleteReplicationByUuid(ctx context.Context, uuid strfmt.UUID) error
- func (_m *MockManager) ForceDeleteReplicationsByCollection(ctx context.Context, collection string) error
- func (_m *MockManager) ForceDeleteReplicationsByCollectionAndShard(ctx context.Context, collection string, shard string) error
- func (_m *MockManager) ForceDeleteReplicationsByTargetNode(ctx context.Context, node string) error
- func (_m *MockManager) GetAllReplicationDetails(ctx context.Context) ([]api.ReplicationDetailsResponse, error)
- func (_m *MockManager) GetReplicationDetailsByCollection(ctx context.Context, collection string) ([]api.ReplicationDetailsResponse, error)
- func (_m *MockManager) GetReplicationDetailsByCollectionAndShard(ctx context.Context, collection string, shard string) ([]api.ReplicationDetailsResponse, error)
- func (_m *MockManager) GetReplicationDetailsByReplicationId(ctx context.Context, uuid strfmt.UUID) (api.ReplicationDetailsResponse, error)
- func (_m *MockManager) GetReplicationDetailsByTargetNode(ctx context.Context, node string) ([]api.ReplicationDetailsResponse, error)
- func (_m *MockManager) GetReplicationScalePlan(ctx context.Context, collection string, replicationFactor int) (api.ReplicationScalePlan, error)
- func (_m *MockManager) QueryShardingStateByCollection(ctx context.Context, collection string) (api.ShardingState, error)
- func (_m *MockManager) QueryShardingStateByCollectionAndShard(ctx context.Context, collection string, shard string) (api.ShardingState, error)
- func (_m *MockManager) ReplicationReplicateReplica(ctx context.Context, opId strfmt.UUID, sourceNode string, ...) error
- type MockManager_ApplyReplicationScalePlan_Call
- func (_c *MockManager_ApplyReplicationScalePlan_Call) Return(_a0 []strfmt.UUID, _a1 error) *MockManager_ApplyReplicationScalePlan_Call
- func (_c *MockManager_ApplyReplicationScalePlan_Call) Run(run func(ctx context.Context, scalePlan api.ReplicationScalePlan)) *MockManager_ApplyReplicationScalePlan_Call
- func (_c *MockManager_ApplyReplicationScalePlan_Call) RunAndReturn(run func(context.Context, api.ReplicationScalePlan) ([]strfmt.UUID, error)) *MockManager_ApplyReplicationScalePlan_Call
- type MockManager_CancelReplication_Call
- func (_c *MockManager_CancelReplication_Call) Return(_a0 error) *MockManager_CancelReplication_Call
- func (_c *MockManager_CancelReplication_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_CancelReplication_Call
- func (_c *MockManager_CancelReplication_Call) RunAndReturn(run func(context.Context, strfmt.UUID) error) *MockManager_CancelReplication_Call
- type MockManager_DeleteAllReplications_Call
- func (_c *MockManager_DeleteAllReplications_Call) Return(_a0 error) *MockManager_DeleteAllReplications_Call
- func (_c *MockManager_DeleteAllReplications_Call) Run(run func(ctx context.Context)) *MockManager_DeleteAllReplications_Call
- func (_c *MockManager_DeleteAllReplications_Call) RunAndReturn(run func(context.Context) error) *MockManager_DeleteAllReplications_Call
- type MockManager_DeleteReplication_Call
- func (_c *MockManager_DeleteReplication_Call) Return(_a0 error) *MockManager_DeleteReplication_Call
- func (_c *MockManager_DeleteReplication_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_DeleteReplication_Call
- func (_c *MockManager_DeleteReplication_Call) RunAndReturn(run func(context.Context, strfmt.UUID) error) *MockManager_DeleteReplication_Call
- type MockManager_DeleteReplicationsByCollection_Call
- func (_c *MockManager_DeleteReplicationsByCollection_Call) Return(_a0 error) *MockManager_DeleteReplicationsByCollection_Call
- func (_c *MockManager_DeleteReplicationsByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_DeleteReplicationsByCollection_Call
- func (_c *MockManager_DeleteReplicationsByCollection_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_DeleteReplicationsByCollection_Call
- type MockManager_DeleteReplicationsByTenants_Call
- func (_c *MockManager_DeleteReplicationsByTenants_Call) Return(_a0 error) *MockManager_DeleteReplicationsByTenants_Call
- func (_c *MockManager_DeleteReplicationsByTenants_Call) Run(run func(ctx context.Context, collection string, tenants []string)) *MockManager_DeleteReplicationsByTenants_Call
- func (_c *MockManager_DeleteReplicationsByTenants_Call) RunAndReturn(run func(context.Context, string, []string) error) *MockManager_DeleteReplicationsByTenants_Call
- type MockManager_Expecter
- func (_e *MockManager_Expecter) ApplyReplicationScalePlan(ctx interface{}, scalePlan interface{}) *MockManager_ApplyReplicationScalePlan_Call
- func (_e *MockManager_Expecter) CancelReplication(ctx interface{}, uuid interface{}) *MockManager_CancelReplication_Call
- func (_e *MockManager_Expecter) DeleteAllReplications(ctx interface{}) *MockManager_DeleteAllReplications_Call
- func (_e *MockManager_Expecter) DeleteReplication(ctx interface{}, uuid interface{}) *MockManager_DeleteReplication_Call
- func (_e *MockManager_Expecter) DeleteReplicationsByCollection(ctx interface{}, collection interface{}) *MockManager_DeleteReplicationsByCollection_Call
- func (_e *MockManager_Expecter) DeleteReplicationsByTenants(ctx interface{}, collection interface{}, tenants interface{}) *MockManager_DeleteReplicationsByTenants_Call
- func (_e *MockManager_Expecter) ForceDeleteAllReplications(ctx interface{}) *MockManager_ForceDeleteAllReplications_Call
- func (_e *MockManager_Expecter) ForceDeleteReplicationByUuid(ctx interface{}, uuid interface{}) *MockManager_ForceDeleteReplicationByUuid_Call
- func (_e *MockManager_Expecter) ForceDeleteReplicationsByCollection(ctx interface{}, collection interface{}) *MockManager_ForceDeleteReplicationsByCollection_Call
- func (_e *MockManager_Expecter) ForceDeleteReplicationsByCollectionAndShard(ctx interface{}, collection interface{}, shard interface{}) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
- func (_e *MockManager_Expecter) ForceDeleteReplicationsByTargetNode(ctx interface{}, node interface{}) *MockManager_ForceDeleteReplicationsByTargetNode_Call
- func (_e *MockManager_Expecter) GetAllReplicationDetails(ctx interface{}) *MockManager_GetAllReplicationDetails_Call
- func (_e *MockManager_Expecter) GetReplicationDetailsByCollection(ctx interface{}, collection interface{}) *MockManager_GetReplicationDetailsByCollection_Call
- func (_e *MockManager_Expecter) GetReplicationDetailsByCollectionAndShard(ctx interface{}, collection interface{}, shard interface{}) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
- func (_e *MockManager_Expecter) GetReplicationDetailsByReplicationId(ctx interface{}, uuid interface{}) *MockManager_GetReplicationDetailsByReplicationId_Call
- func (_e *MockManager_Expecter) GetReplicationDetailsByTargetNode(ctx interface{}, node interface{}) *MockManager_GetReplicationDetailsByTargetNode_Call
- func (_e *MockManager_Expecter) GetReplicationScalePlan(ctx interface{}, collection interface{}, replicationFactor interface{}) *MockManager_GetReplicationScalePlan_Call
- func (_e *MockManager_Expecter) QueryShardingStateByCollection(ctx interface{}, collection interface{}) *MockManager_QueryShardingStateByCollection_Call
- func (_e *MockManager_Expecter) QueryShardingStateByCollectionAndShard(ctx interface{}, collection interface{}, shard interface{}) *MockManager_QueryShardingStateByCollectionAndShard_Call
- func (_e *MockManager_Expecter) ReplicationReplicateReplica(ctx interface{}, opId interface{}, sourceNode interface{}, ...) *MockManager_ReplicationReplicateReplica_Call
- type MockManager_ForceDeleteAllReplications_Call
- func (_c *MockManager_ForceDeleteAllReplications_Call) Return(_a0 error) *MockManager_ForceDeleteAllReplications_Call
- func (_c *MockManager_ForceDeleteAllReplications_Call) Run(run func(ctx context.Context)) *MockManager_ForceDeleteAllReplications_Call
- func (_c *MockManager_ForceDeleteAllReplications_Call) RunAndReturn(run func(context.Context) error) *MockManager_ForceDeleteAllReplications_Call
- type MockManager_ForceDeleteReplicationByUuid_Call
- func (_c *MockManager_ForceDeleteReplicationByUuid_Call) Return(_a0 error) *MockManager_ForceDeleteReplicationByUuid_Call
- func (_c *MockManager_ForceDeleteReplicationByUuid_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_ForceDeleteReplicationByUuid_Call
- func (_c *MockManager_ForceDeleteReplicationByUuid_Call) RunAndReturn(run func(context.Context, strfmt.UUID) error) *MockManager_ForceDeleteReplicationByUuid_Call
- type MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
- func (_c *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) Return(_a0 error) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
- func (_c *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) Run(run func(ctx context.Context, collection string, shard string)) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
- func (_c *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) RunAndReturn(run func(context.Context, string, string) error) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
- type MockManager_ForceDeleteReplicationsByCollection_Call
- func (_c *MockManager_ForceDeleteReplicationsByCollection_Call) Return(_a0 error) *MockManager_ForceDeleteReplicationsByCollection_Call
- func (_c *MockManager_ForceDeleteReplicationsByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_ForceDeleteReplicationsByCollection_Call
- func (_c *MockManager_ForceDeleteReplicationsByCollection_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_ForceDeleteReplicationsByCollection_Call
- type MockManager_ForceDeleteReplicationsByTargetNode_Call
- func (_c *MockManager_ForceDeleteReplicationsByTargetNode_Call) Return(_a0 error) *MockManager_ForceDeleteReplicationsByTargetNode_Call
- func (_c *MockManager_ForceDeleteReplicationsByTargetNode_Call) Run(run func(ctx context.Context, node string)) *MockManager_ForceDeleteReplicationsByTargetNode_Call
- func (_c *MockManager_ForceDeleteReplicationsByTargetNode_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_ForceDeleteReplicationsByTargetNode_Call
- type MockManager_GetAllReplicationDetails_Call
- func (_c *MockManager_GetAllReplicationDetails_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetAllReplicationDetails_Call
- func (_c *MockManager_GetAllReplicationDetails_Call) Run(run func(ctx context.Context)) *MockManager_GetAllReplicationDetails_Call
- func (_c *MockManager_GetAllReplicationDetails_Call) RunAndReturn(run func(context.Context) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetAllReplicationDetails_Call
- type MockManager_GetReplicationDetailsByCollectionAndShard_Call
- func (_c *MockManager_GetReplicationDetailsByCollectionAndShard_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
- func (_c *MockManager_GetReplicationDetailsByCollectionAndShard_Call) Run(run func(ctx context.Context, collection string, shard string)) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
- func (_c *MockManager_GetReplicationDetailsByCollectionAndShard_Call) RunAndReturn(...) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
- type MockManager_GetReplicationDetailsByCollection_Call
- func (_c *MockManager_GetReplicationDetailsByCollection_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetReplicationDetailsByCollection_Call
- func (_c *MockManager_GetReplicationDetailsByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_GetReplicationDetailsByCollection_Call
- func (_c *MockManager_GetReplicationDetailsByCollection_Call) RunAndReturn(run func(context.Context, string) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByCollection_Call
- type MockManager_GetReplicationDetailsByReplicationId_Call
- func (_c *MockManager_GetReplicationDetailsByReplicationId_Call) Return(_a0 api.ReplicationDetailsResponse, _a1 error) *MockManager_GetReplicationDetailsByReplicationId_Call
- func (_c *MockManager_GetReplicationDetailsByReplicationId_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_GetReplicationDetailsByReplicationId_Call
- func (_c *MockManager_GetReplicationDetailsByReplicationId_Call) RunAndReturn(run func(context.Context, strfmt.UUID) (api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByReplicationId_Call
- type MockManager_GetReplicationDetailsByTargetNode_Call
- func (_c *MockManager_GetReplicationDetailsByTargetNode_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetReplicationDetailsByTargetNode_Call
- func (_c *MockManager_GetReplicationDetailsByTargetNode_Call) Run(run func(ctx context.Context, node string)) *MockManager_GetReplicationDetailsByTargetNode_Call
- func (_c *MockManager_GetReplicationDetailsByTargetNode_Call) RunAndReturn(run func(context.Context, string) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByTargetNode_Call
- type MockManager_GetReplicationScalePlan_Call
- func (_c *MockManager_GetReplicationScalePlan_Call) Return(_a0 api.ReplicationScalePlan, _a1 error) *MockManager_GetReplicationScalePlan_Call
- func (_c *MockManager_GetReplicationScalePlan_Call) Run(run func(ctx context.Context, collection string, replicationFactor int)) *MockManager_GetReplicationScalePlan_Call
- func (_c *MockManager_GetReplicationScalePlan_Call) RunAndReturn(run func(context.Context, string, int) (api.ReplicationScalePlan, error)) *MockManager_GetReplicationScalePlan_Call
- type MockManager_QueryShardingStateByCollectionAndShard_Call
- func (_c *MockManager_QueryShardingStateByCollectionAndShard_Call) Return(_a0 api.ShardingState, _a1 error) *MockManager_QueryShardingStateByCollectionAndShard_Call
- func (_c *MockManager_QueryShardingStateByCollectionAndShard_Call) Run(run func(ctx context.Context, collection string, shard string)) *MockManager_QueryShardingStateByCollectionAndShard_Call
- func (_c *MockManager_QueryShardingStateByCollectionAndShard_Call) RunAndReturn(run func(context.Context, string, string) (api.ShardingState, error)) *MockManager_QueryShardingStateByCollectionAndShard_Call
- type MockManager_QueryShardingStateByCollection_Call
- func (_c *MockManager_QueryShardingStateByCollection_Call) Return(_a0 api.ShardingState, _a1 error) *MockManager_QueryShardingStateByCollection_Call
- func (_c *MockManager_QueryShardingStateByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_QueryShardingStateByCollection_Call
- func (_c *MockManager_QueryShardingStateByCollection_Call) RunAndReturn(run func(context.Context, string) (api.ShardingState, error)) *MockManager_QueryShardingStateByCollection_Call
- type MockManager_ReplicationReplicateReplica_Call
- func (_c *MockManager_ReplicationReplicateReplica_Call) Return(_a0 error) *MockManager_ReplicationReplicateReplica_Call
- func (_c *MockManager_ReplicationReplicateReplica_Call) Run(run func(ctx context.Context, opId strfmt.UUID, sourceNode string, ...)) *MockManager_ReplicationReplicateReplica_Call
- func (_c *MockManager_ReplicationReplicateReplica_Call) RunAndReturn(...) *MockManager_ReplicationReplicateReplica_Call
- type MockReplicaCopier
- func (_m *MockReplicaCopier) AddAsyncReplicationTargetNode(ctx context.Context, ...) error
- func (_m *MockReplicaCopier) AsyncReplicationStatus(ctx context.Context, srcNodeId string, targetNodeId string, ...) (models.AsyncReplicationStatus, error)
- func (_m *MockReplicaCopier) CopyReplicaFiles(ctx context.Context, sourceNode string, sourceCollection string, ...) error
- func (_m *MockReplicaCopier) EXPECT() *MockReplicaCopier_Expecter
- func (_m *MockReplicaCopier) InitAsyncReplicationLocally(ctx context.Context, collectionName string, shardName string) error
- func (_m *MockReplicaCopier) LoadLocalShard(ctx context.Context, collectionName string, shardName string) error
- func (_m *MockReplicaCopier) RemoveAsyncReplicationTargetNode(ctx context.Context, ...) error
- func (_m *MockReplicaCopier) RevertAsyncReplicationLocally(ctx context.Context, collectionName string, shardName string) error
- type MockReplicaCopier_AddAsyncReplicationTargetNode_Call
- func (_c *MockReplicaCopier_AddAsyncReplicationTargetNode_Call) Return(_a0 error) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
- func (_c *MockReplicaCopier_AddAsyncReplicationTargetNode_Call) Run(run func(ctx context.Context, ...)) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
- func (_c *MockReplicaCopier_AddAsyncReplicationTargetNode_Call) RunAndReturn(...) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
- type MockReplicaCopier_AsyncReplicationStatus_Call
- func (_c *MockReplicaCopier_AsyncReplicationStatus_Call) Return(_a0 models.AsyncReplicationStatus, _a1 error) *MockReplicaCopier_AsyncReplicationStatus_Call
- func (_c *MockReplicaCopier_AsyncReplicationStatus_Call) Run(run func(ctx context.Context, srcNodeId string, targetNodeId string, ...)) *MockReplicaCopier_AsyncReplicationStatus_Call
- func (_c *MockReplicaCopier_AsyncReplicationStatus_Call) RunAndReturn(...) *MockReplicaCopier_AsyncReplicationStatus_Call
- type MockReplicaCopier_CopyReplicaFiles_Call
- func (_c *MockReplicaCopier_CopyReplicaFiles_Call) Return(_a0 error) *MockReplicaCopier_CopyReplicaFiles_Call
- func (_c *MockReplicaCopier_CopyReplicaFiles_Call) Run(run func(ctx context.Context, sourceNode string, sourceCollection string, ...)) *MockReplicaCopier_CopyReplicaFiles_Call
- func (_c *MockReplicaCopier_CopyReplicaFiles_Call) RunAndReturn(run func(context.Context, string, string, string, uint64) error) *MockReplicaCopier_CopyReplicaFiles_Call
- type MockReplicaCopier_Expecter
- func (_e *MockReplicaCopier_Expecter) AddAsyncReplicationTargetNode(ctx interface{}, targetNodeOverride interface{}, schemaVersion interface{}) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
- func (_e *MockReplicaCopier_Expecter) AsyncReplicationStatus(ctx interface{}, srcNodeId interface{}, targetNodeId interface{}, ...) *MockReplicaCopier_AsyncReplicationStatus_Call
- func (_e *MockReplicaCopier_Expecter) CopyReplicaFiles(ctx interface{}, sourceNode interface{}, sourceCollection interface{}, ...) *MockReplicaCopier_CopyReplicaFiles_Call
- func (_e *MockReplicaCopier_Expecter) InitAsyncReplicationLocally(ctx interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_InitAsyncReplicationLocally_Call
- func (_e *MockReplicaCopier_Expecter) LoadLocalShard(ctx interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_LoadLocalShard_Call
- func (_e *MockReplicaCopier_Expecter) RemoveAsyncReplicationTargetNode(ctx interface{}, targetNodeOverride interface{}) *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
- func (_e *MockReplicaCopier_Expecter) RevertAsyncReplicationLocally(ctx interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
- type MockReplicaCopier_InitAsyncReplicationLocally_Call
- func (_c *MockReplicaCopier_InitAsyncReplicationLocally_Call) Return(_a0 error) *MockReplicaCopier_InitAsyncReplicationLocally_Call
- func (_c *MockReplicaCopier_InitAsyncReplicationLocally_Call) Run(run func(ctx context.Context, collectionName string, shardName string)) *MockReplicaCopier_InitAsyncReplicationLocally_Call
- func (_c *MockReplicaCopier_InitAsyncReplicationLocally_Call) RunAndReturn(run func(context.Context, string, string) error) *MockReplicaCopier_InitAsyncReplicationLocally_Call
- type MockReplicaCopier_LoadLocalShard_Call
- func (_c *MockReplicaCopier_LoadLocalShard_Call) Return(_a0 error) *MockReplicaCopier_LoadLocalShard_Call
- func (_c *MockReplicaCopier_LoadLocalShard_Call) Run(run func(ctx context.Context, collectionName string, shardName string)) *MockReplicaCopier_LoadLocalShard_Call
- func (_c *MockReplicaCopier_LoadLocalShard_Call) RunAndReturn(run func(context.Context, string, string) error) *MockReplicaCopier_LoadLocalShard_Call
- type MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
- func (_c *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) Return(_a0 error) *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
- func (_c *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) Run(run func(ctx context.Context, ...)) *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
- func (_c *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) RunAndReturn(run func(context.Context, additional.AsyncReplicationTargetNodeOverride) error) *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
- type MockReplicaCopier_RevertAsyncReplicationLocally_Call
- func (_c *MockReplicaCopier_RevertAsyncReplicationLocally_Call) Return(_a0 error) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
- func (_c *MockReplicaCopier_RevertAsyncReplicationLocally_Call) Run(run func(ctx context.Context, collectionName string, shardName string)) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
- func (_c *MockReplicaCopier_RevertAsyncReplicationLocally_Call) RunAndReturn(run func(context.Context, string, string) error) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
- type MockReplicationFSMReader
- func (_m *MockReplicationFSMReader) EXPECT() *MockReplicationFSMReader_Expecter
- func (_m *MockReplicationFSMReader) FilterOneShardReplicasRead(collection string, shard string, shardReplicasLocation []string) []string
- func (_m *MockReplicationFSMReader) FilterOneShardReplicasWrite(collection string, shard string, shardReplicasLocation []string) ([]string, []string)
- type MockReplicationFSMReader_Expecter
- func (_e *MockReplicationFSMReader_Expecter) FilterOneShardReplicasRead(collection interface{}, shard interface{}, shardReplicasLocation interface{}) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
- func (_e *MockReplicationFSMReader_Expecter) FilterOneShardReplicasWrite(collection interface{}, shard interface{}, shardReplicasLocation interface{}) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
- type MockReplicationFSMReader_FilterOneShardReplicasRead_Call
- func (_c *MockReplicationFSMReader_FilterOneShardReplicasRead_Call) Return(_a0 []string) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
- func (_c *MockReplicationFSMReader_FilterOneShardReplicasRead_Call) Run(run func(collection string, shard string, shardReplicasLocation []string)) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
- func (_c *MockReplicationFSMReader_FilterOneShardReplicasRead_Call) RunAndReturn(run func(string, string, []string) []string) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
- type MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
- func (_c *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Return(_a0 []string, _a1 []string) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
- func (_c *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Run(run func(collection string, shard string, shardReplicasLocation []string)) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
- func (_c *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) RunAndReturn(run func(string, string, []string) ([]string, []string)) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
- type ReplicaCopier
- type ReplicationFSMReader
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidRequest = errors.New("invalid request") ErrCancellationImpossible = errors.New("cancellation impossible") ErrDeletionImpossible = errors.New("deletion impossible") ErrReplicationOperationNotFound = errors.New("replication operation not found") // ErrNotFound is a custom error that is used to indicate that a resource was not found. // We use it to return a specific error code from the RPC layer to ensure we don't retry an operation // returning an error indicating that the resource was not found. // We add E00001 to the error string to ensure it's unique and can be checked for specifically. // Otherwise it could be matched against any "not found" error. ErrNotFound = errors.New("E00001: not found") )
Functions ¶
This section is empty.
Types ¶
type FSMUpdater ¶
type FSMUpdater interface {
ReplicationAddReplicaToShard(ctx context.Context, collection string, shard string, nodeId string, opId uint64) (uint64, error)
DeleteReplicaFromShard(ctx context.Context, collection string, shard string, nodeId string) (uint64, error)
SyncShard(ctx context.Context, collection string, shard string, nodeId string) (uint64, error)
ReplicationUpdateReplicaOpStatus(ctx context.Context, id uint64, state api.ShardReplicationState) error
ReplicationRegisterError(ctx context.Context, id uint64, errorToRegister string) error
ReplicationRemoveReplicaOp(ctx context.Context, id uint64) error
ReplicationCancellationComplete(ctx context.Context, id uint64) error
ReplicationGetReplicaOpStatus(ctx context.Context, id uint64) (api.ShardReplicationState, error)
ReplicationStoreSchemaVersion(ctx context.Context, id uint64, schemaVersion uint64) error
UpdateTenants(ctx context.Context, class string, req *api.UpdateTenantsRequest) (uint64, error)
WaitForUpdate(ctx context.Context, schemaVersion uint64) error
}
type Manager ¶
type Manager interface {
QueryShardingStateByCollection(ctx context.Context, collection string) (api.ShardingState, error)
QueryShardingStateByCollectionAndShard(ctx context.Context, collection string, shard string) (api.ShardingState, error)
GetReplicationScalePlan(ctx context.Context, collection string, replicationFactor int) (api.ReplicationScalePlan, error)
ApplyReplicationScalePlan(ctx context.Context, scalePlan api.ReplicationScalePlan) ([]strfmt.UUID, error)
ReplicationReplicateReplica(ctx context.Context, opId strfmt.UUID, sourceNode string, sourceCollection string, sourceShard string, targetNode string, transferType string) error
// GetReplicationDetailsByReplicationId retrieves the details of a replication operation by its UUID.
//
// Parameters:
// - uuid: The unique identifier for the replication operation (strfmt.UUID).
//
// Returns:
// - api.ReplicationDetailsResponse: Contains the details of the requested replication operation.
// - error: Returns ErrReplicationOperationNotFound if the operation doesn't exist,
// or another error explaining why retrieving the replication operation details failed.
GetReplicationDetailsByReplicationId(ctx context.Context, uuid strfmt.UUID) (api.ReplicationDetailsResponse, error)
// GetReplicationDetailsByCollection retrieves the details of all replication operations for a given collection.
//
// Parameters:
// - collection: The name of the collection to retrieve replication details for.
//
// Returns:
// - []api.ReplicationDetailsResponse: A list of replication details for the given collection. Returns an empty list if there are no replication operations for the given collection.
// - error: Returns an error if fetching the replication details failed.
GetReplicationDetailsByCollection(ctx context.Context, collection string) ([]api.ReplicationDetailsResponse, error)
// GetReplicationDetailsByCollectionAndShard retrieves the details of all replication operations for a given collection and shard.
//
// Parameters:
// - collection: The name of the collection to retrieve replication details for.
// - shard: The name of the shard to retrieve replication details for.
//
// Returns:
// - []api.ReplicationDetailsResponse: A list of replication details for the given collection and shard. Returns an empty list if there are no replication operations for the given collection and shard.
// - error: Returns an error if fetching the replication details failed.
GetReplicationDetailsByCollectionAndShard(ctx context.Context, collection string, shard string) ([]api.ReplicationDetailsResponse, error)
// GetReplicationDetailsByTargetNode retrieves the details of all replication operations for a given target node.
//
// Parameters:
// - node: The name of the target node to retrieve replication details for.
//
// Returns:
// - []api.ReplicationDetailsResponse: A list of replication details for the given target node. Returns an empty list if there are no replication operations for the given target node.
// - error: Returns an error if fetching the replication details failed.
GetReplicationDetailsByTargetNode(ctx context.Context, node string) ([]api.ReplicationDetailsResponse, error)
// GetAllReplicationDetails retrieves the details of all replication operations.
//
// Returns:
// - []api.ReplicationDetailsResponse: A list of replication details for the given target node. Returns an empty list if there are no replication operations for the given target node.
// - error: Returns an error if fetching the replication details failed.
GetAllReplicationDetails(ctx context.Context) ([]api.ReplicationDetailsResponse, error)
// CancelReplication cancels a replication operation meaning that the operation is stopped, cleaned-up on the target, and moved to the CANCELLED state.
//
// Parameters:
// - uuid: The unique identifier for the replication operation (strfmt.UUID).
// Returns:
// - error: Returns ErrReplicationOperationNotFound if the operation doesn't exist,
// or another error explaining why cancelling the replication operation failed.
CancelReplication(ctx context.Context, uuid strfmt.UUID) error
// DeleteReplication removes a replication operation from the FSM. If it's in progress, it will be cancelled first.
//
// Parameters:
// - uuid: The unique identifier for the replication operation (strfmt.UUID).
// Returns:
// - error: Returns ErrReplicationOperationNotFound if the operation doesn't exist,
// or another error explaining why cancelling the replication operation failed.
DeleteReplication(ctx context.Context, uuid strfmt.UUID) error
// DeleteReplicationsByCollection removes all replication operations for a specific collection.
//
// This is required when a collection is deleted, and all replication operations for that collection should be removed including in-flight operations that must be cancelled first.
//
// Parameters:
// - collection: The name of the collection for which to delete replication operations.
// Returns:
// - error: Returns an error if the deletion of replication operations fails.
DeleteReplicationsByCollection(ctx context.Context, collection string) error
// DeleteReplicationsByTenants removes all replication operations for specified tenants in a specific collection.
//
// This is required when tenants are deleted, and all replication operations for those tenants should be removed including in-flight operations that must be cancelled first.
//
// Parameters:
// - collection: The name of the collection for which to delete replication operations.
// - tenants: The list of tenants for which to delete replication operations.
// Returns:
// - error: Returns an error if the deletion of replication operations fails.
DeleteReplicationsByTenants(ctx context.Context, collection string, tenants []string) error
// DeleteAllReplications removes all replication operation from the FSM.
// If they are in progress, then they are cancelled first.
//
// Returns:
// - error: any error explaining why cancelling the replication operation failed.
DeleteAllReplications(ctx context.Context) error
// ForceDeleteReplicationByReplicationId forcefully deletes a replication operation by its UUID.
// This operation does not cancel the replication operation, it simply removes it from the FSM.
//
// Parameters:
// - uuid: The unique identifier for the replication operation (strfmt.UUID).
//
// Returns:
// - error: Returns an error if force deleting the replication operation failed.
ForceDeleteReplicationByUuid(ctx context.Context, uuid strfmt.UUID) error
// ForceDeleteReplicationByCollection forcefully deletes all replication operations for a given collection.
// This operation does not cancel the replication operations, it simply removes it from the FSM.
//
// Parameters:
// - collection: The name of the collection to force delete replication operations for.
//
// Returns:
// - error: Returns an error if force deleting the replication operation failed.
ForceDeleteReplicationsByCollection(ctx context.Context, collection string) error
// ForceDeleteReplicationByCollectionAndShard forcefully deletes all replication operations for a given collection and shard.
// This operation does not cancel the replication operations, it simply removes it from the FSM.
//
// Parameters:
// - collection: The name of the collection to force delete replication operations for.
// - shard: The name of the shard to force delete replication operations for.
//
// Returns:
// - error: Returns an error if force deleting the replication operation failed.
ForceDeleteReplicationsByCollectionAndShard(ctx context.Context, collection string, shard string) error
// ForceDeleteReplicationByTargetNode forcefully deletes all replication operations for a given target node.
// This operation does not cancel the replication operations, it simply removes it from the FSM.
//
// Parameters:
// - node: The name of the target node to force delete replication operations for.
//
// Returns:
// - error: Returns an error if force deleting the replication operation failed.
ForceDeleteReplicationsByTargetNode(ctx context.Context, node string) error
// ForceDeleteAllReplication forcefully deletes all replication operations.
// This operation does not cancel the replication operations, it simply removes it from the FSM.
//
// Returns:
// - error: Returns an error if force deleting the replication operation failed.
ForceDeleteAllReplications(ctx context.Context) error
}
type MockFSMUpdater ¶
MockFSMUpdater is an autogenerated mock type for the FSMUpdater type
func NewMockFSMUpdater ¶
func NewMockFSMUpdater(t interface {
mock.TestingT
Cleanup(func())
}) *MockFSMUpdater
NewMockFSMUpdater creates a new instance of MockFSMUpdater. 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 (*MockFSMUpdater) DeleteReplicaFromShard ¶
func (_m *MockFSMUpdater) DeleteReplicaFromShard(ctx context.Context, collection string, shard string, nodeId string) (uint64, error)
DeleteReplicaFromShard provides a mock function with given fields: ctx, collection, shard, nodeId
func (*MockFSMUpdater) EXPECT ¶
func (_m *MockFSMUpdater) EXPECT() *MockFSMUpdater_Expecter
func (*MockFSMUpdater) ReplicationAddReplicaToShard ¶
func (_m *MockFSMUpdater) ReplicationAddReplicaToShard(ctx context.Context, collection string, shard string, nodeId string, opId uint64) (uint64, error)
ReplicationAddReplicaToShard provides a mock function with given fields: ctx, collection, shard, nodeId, opId
func (*MockFSMUpdater) ReplicationCancellationComplete ¶
func (_m *MockFSMUpdater) ReplicationCancellationComplete(ctx context.Context, id uint64) error
ReplicationCancellationComplete provides a mock function with given fields: ctx, id
func (*MockFSMUpdater) ReplicationGetReplicaOpStatus ¶
func (_m *MockFSMUpdater) ReplicationGetReplicaOpStatus(ctx context.Context, id uint64) (api.ShardReplicationState, error)
ReplicationGetReplicaOpStatus provides a mock function with given fields: ctx, id
func (*MockFSMUpdater) ReplicationRegisterError ¶
func (_m *MockFSMUpdater) ReplicationRegisterError(ctx context.Context, id uint64, errorToRegister string) error
ReplicationRegisterError provides a mock function with given fields: ctx, id, errorToRegister
func (*MockFSMUpdater) ReplicationRemoveReplicaOp ¶
func (_m *MockFSMUpdater) ReplicationRemoveReplicaOp(ctx context.Context, id uint64) error
ReplicationRemoveReplicaOp provides a mock function with given fields: ctx, id
func (*MockFSMUpdater) ReplicationStoreSchemaVersion ¶
func (_m *MockFSMUpdater) ReplicationStoreSchemaVersion(ctx context.Context, id uint64, schemaVersion uint64) error
ReplicationStoreSchemaVersion provides a mock function with given fields: ctx, id, schemaVersion
func (*MockFSMUpdater) ReplicationUpdateReplicaOpStatus ¶
func (_m *MockFSMUpdater) ReplicationUpdateReplicaOpStatus(ctx context.Context, id uint64, state api.ShardReplicationState) error
ReplicationUpdateReplicaOpStatus provides a mock function with given fields: ctx, id, state
func (*MockFSMUpdater) SyncShard ¶
func (_m *MockFSMUpdater) SyncShard(ctx context.Context, collection string, shard string, nodeId string) (uint64, error)
SyncShard provides a mock function with given fields: ctx, collection, shard, nodeId
func (*MockFSMUpdater) UpdateTenants ¶
func (_m *MockFSMUpdater) UpdateTenants(ctx context.Context, class string, req *api.UpdateTenantsRequest) (uint64, error)
UpdateTenants provides a mock function with given fields: ctx, class, req
func (*MockFSMUpdater) WaitForUpdate ¶
func (_m *MockFSMUpdater) WaitForUpdate(ctx context.Context, schemaVersion uint64) error
WaitForUpdate provides a mock function with given fields: ctx, schemaVersion
type MockFSMUpdater_DeleteReplicaFromShard_Call ¶
MockFSMUpdater_DeleteReplicaFromShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteReplicaFromShard'
func (*MockFSMUpdater_DeleteReplicaFromShard_Call) Return ¶
func (_c *MockFSMUpdater_DeleteReplicaFromShard_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_DeleteReplicaFromShard_Call
func (*MockFSMUpdater_DeleteReplicaFromShard_Call) Run ¶
func (_c *MockFSMUpdater_DeleteReplicaFromShard_Call) Run(run func(ctx context.Context, collection string, shard string, nodeId string)) *MockFSMUpdater_DeleteReplicaFromShard_Call
func (*MockFSMUpdater_DeleteReplicaFromShard_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_DeleteReplicaFromShard_Call) RunAndReturn(run func(context.Context, string, string, string) (uint64, error)) *MockFSMUpdater_DeleteReplicaFromShard_Call
type MockFSMUpdater_Expecter ¶
type MockFSMUpdater_Expecter struct {
// contains filtered or unexported fields
}
func (*MockFSMUpdater_Expecter) DeleteReplicaFromShard ¶
func (_e *MockFSMUpdater_Expecter) DeleteReplicaFromShard(ctx interface{}, collection interface{}, shard interface{}, nodeId interface{}) *MockFSMUpdater_DeleteReplicaFromShard_Call
DeleteReplicaFromShard is a helper method to define mock.On call
- ctx context.Context
- collection string
- shard string
- nodeId string
func (*MockFSMUpdater_Expecter) ReplicationAddReplicaToShard ¶
func (_e *MockFSMUpdater_Expecter) ReplicationAddReplicaToShard(ctx interface{}, collection interface{}, shard interface{}, nodeId interface{}, opId interface{}) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
ReplicationAddReplicaToShard is a helper method to define mock.On call
- ctx context.Context
- collection string
- shard string
- nodeId string
- opId uint64
func (*MockFSMUpdater_Expecter) ReplicationCancellationComplete ¶
func (_e *MockFSMUpdater_Expecter) ReplicationCancellationComplete(ctx interface{}, id interface{}) *MockFSMUpdater_ReplicationCancellationComplete_Call
ReplicationCancellationComplete is a helper method to define mock.On call
- ctx context.Context
- id uint64
func (*MockFSMUpdater_Expecter) ReplicationGetReplicaOpStatus ¶
func (_e *MockFSMUpdater_Expecter) ReplicationGetReplicaOpStatus(ctx interface{}, id interface{}) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
ReplicationGetReplicaOpStatus is a helper method to define mock.On call
- ctx context.Context
- id uint64
func (*MockFSMUpdater_Expecter) ReplicationRegisterError ¶
func (_e *MockFSMUpdater_Expecter) ReplicationRegisterError(ctx interface{}, id interface{}, errorToRegister interface{}) *MockFSMUpdater_ReplicationRegisterError_Call
ReplicationRegisterError is a helper method to define mock.On call
- ctx context.Context
- id uint64
- errorToRegister string
func (*MockFSMUpdater_Expecter) ReplicationRemoveReplicaOp ¶
func (_e *MockFSMUpdater_Expecter) ReplicationRemoveReplicaOp(ctx interface{}, id interface{}) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
ReplicationRemoveReplicaOp is a helper method to define mock.On call
- ctx context.Context
- id uint64
func (*MockFSMUpdater_Expecter) ReplicationStoreSchemaVersion ¶
func (_e *MockFSMUpdater_Expecter) ReplicationStoreSchemaVersion(ctx interface{}, id interface{}, schemaVersion interface{}) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
ReplicationStoreSchemaVersion is a helper method to define mock.On call
- ctx context.Context
- id uint64
- schemaVersion uint64
func (*MockFSMUpdater_Expecter) ReplicationUpdateReplicaOpStatus ¶
func (_e *MockFSMUpdater_Expecter) ReplicationUpdateReplicaOpStatus(ctx interface{}, id interface{}, state interface{}) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
ReplicationUpdateReplicaOpStatus is a helper method to define mock.On call
- ctx context.Context
- id uint64
- state api.ShardReplicationState
func (*MockFSMUpdater_Expecter) SyncShard ¶
func (_e *MockFSMUpdater_Expecter) SyncShard(ctx interface{}, collection interface{}, shard interface{}, nodeId interface{}) *MockFSMUpdater_SyncShard_Call
SyncShard is a helper method to define mock.On call
- ctx context.Context
- collection string
- shard string
- nodeId string
func (*MockFSMUpdater_Expecter) UpdateTenants ¶
func (_e *MockFSMUpdater_Expecter) UpdateTenants(ctx interface{}, class interface{}, req interface{}) *MockFSMUpdater_UpdateTenants_Call
UpdateTenants is a helper method to define mock.On call
- ctx context.Context
- class string
- req *api.UpdateTenantsRequest
func (*MockFSMUpdater_Expecter) WaitForUpdate ¶
func (_e *MockFSMUpdater_Expecter) WaitForUpdate(ctx interface{}, schemaVersion interface{}) *MockFSMUpdater_WaitForUpdate_Call
WaitForUpdate is a helper method to define mock.On call
- ctx context.Context
- schemaVersion uint64
type MockFSMUpdater_ReplicationAddReplicaToShard_Call ¶
MockFSMUpdater_ReplicationAddReplicaToShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationAddReplicaToShard'
func (*MockFSMUpdater_ReplicationAddReplicaToShard_Call) Return ¶
func (_c *MockFSMUpdater_ReplicationAddReplicaToShard_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
func (*MockFSMUpdater_ReplicationAddReplicaToShard_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationAddReplicaToShard_Call) Run(run func(ctx context.Context, collection string, shard string, nodeId string, opId uint64)) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
func (*MockFSMUpdater_ReplicationAddReplicaToShard_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationAddReplicaToShard_Call) RunAndReturn(run func(context.Context, string, string, string, uint64) (uint64, error)) *MockFSMUpdater_ReplicationAddReplicaToShard_Call
type MockFSMUpdater_ReplicationCancellationComplete_Call ¶
MockFSMUpdater_ReplicationCancellationComplete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationCancellationComplete'
func (*MockFSMUpdater_ReplicationCancellationComplete_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationCancellationComplete_Call) Run(run func(ctx context.Context, id uint64)) *MockFSMUpdater_ReplicationCancellationComplete_Call
func (*MockFSMUpdater_ReplicationCancellationComplete_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationCancellationComplete_Call) RunAndReturn(run func(context.Context, uint64) error) *MockFSMUpdater_ReplicationCancellationComplete_Call
type MockFSMUpdater_ReplicationGetReplicaOpStatus_Call ¶
MockFSMUpdater_ReplicationGetReplicaOpStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationGetReplicaOpStatus'
func (*MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Return ¶
func (_c *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Return(_a0 api.ShardReplicationState, _a1 error) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
func (*MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Run(run func(ctx context.Context, id uint64)) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
func (*MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) RunAndReturn(run func(context.Context, uint64) (api.ShardReplicationState, error)) *MockFSMUpdater_ReplicationGetReplicaOpStatus_Call
type MockFSMUpdater_ReplicationRegisterError_Call ¶
MockFSMUpdater_ReplicationRegisterError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationRegisterError'
func (*MockFSMUpdater_ReplicationRegisterError_Call) Return ¶
func (_c *MockFSMUpdater_ReplicationRegisterError_Call) Return(_a0 error) *MockFSMUpdater_ReplicationRegisterError_Call
func (*MockFSMUpdater_ReplicationRegisterError_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationRegisterError_Call) Run(run func(ctx context.Context, id uint64, errorToRegister string)) *MockFSMUpdater_ReplicationRegisterError_Call
func (*MockFSMUpdater_ReplicationRegisterError_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationRegisterError_Call) RunAndReturn(run func(context.Context, uint64, string) error) *MockFSMUpdater_ReplicationRegisterError_Call
type MockFSMUpdater_ReplicationRemoveReplicaOp_Call ¶
MockFSMUpdater_ReplicationRemoveReplicaOp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationRemoveReplicaOp'
func (*MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Return ¶
func (_c *MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Return(_a0 error) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
func (*MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Run(run func(ctx context.Context, id uint64)) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
func (*MockFSMUpdater_ReplicationRemoveReplicaOp_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationRemoveReplicaOp_Call) RunAndReturn(run func(context.Context, uint64) error) *MockFSMUpdater_ReplicationRemoveReplicaOp_Call
type MockFSMUpdater_ReplicationStoreSchemaVersion_Call ¶
MockFSMUpdater_ReplicationStoreSchemaVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationStoreSchemaVersion'
func (*MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Return ¶
func (_c *MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Return(_a0 error) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
func (*MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Run(run func(ctx context.Context, id uint64, schemaVersion uint64)) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
func (*MockFSMUpdater_ReplicationStoreSchemaVersion_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationStoreSchemaVersion_Call) RunAndReturn(run func(context.Context, uint64, uint64) error) *MockFSMUpdater_ReplicationStoreSchemaVersion_Call
type MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call ¶
MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationUpdateReplicaOpStatus'
func (*MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) Run ¶
func (_c *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) Run(run func(ctx context.Context, id uint64, state api.ShardReplicationState)) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
func (*MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) RunAndReturn(run func(context.Context, uint64, api.ShardReplicationState) error) *MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call
type MockFSMUpdater_SyncShard_Call ¶
MockFSMUpdater_SyncShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncShard'
func (*MockFSMUpdater_SyncShard_Call) Return ¶
func (_c *MockFSMUpdater_SyncShard_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_SyncShard_Call
func (*MockFSMUpdater_SyncShard_Call) Run ¶
func (_c *MockFSMUpdater_SyncShard_Call) Run(run func(ctx context.Context, collection string, shard string, nodeId string)) *MockFSMUpdater_SyncShard_Call
func (*MockFSMUpdater_SyncShard_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_SyncShard_Call) RunAndReturn(run func(context.Context, string, string, string) (uint64, error)) *MockFSMUpdater_SyncShard_Call
type MockFSMUpdater_UpdateTenants_Call ¶
MockFSMUpdater_UpdateTenants_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTenants'
func (*MockFSMUpdater_UpdateTenants_Call) Return ¶
func (_c *MockFSMUpdater_UpdateTenants_Call) Return(_a0 uint64, _a1 error) *MockFSMUpdater_UpdateTenants_Call
func (*MockFSMUpdater_UpdateTenants_Call) Run ¶
func (_c *MockFSMUpdater_UpdateTenants_Call) Run(run func(ctx context.Context, class string, req *api.UpdateTenantsRequest)) *MockFSMUpdater_UpdateTenants_Call
func (*MockFSMUpdater_UpdateTenants_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_UpdateTenants_Call) RunAndReturn(run func(context.Context, string, *api.UpdateTenantsRequest) (uint64, error)) *MockFSMUpdater_UpdateTenants_Call
type MockFSMUpdater_WaitForUpdate_Call ¶
MockFSMUpdater_WaitForUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForUpdate'
func (*MockFSMUpdater_WaitForUpdate_Call) Return ¶
func (_c *MockFSMUpdater_WaitForUpdate_Call) Return(_a0 error) *MockFSMUpdater_WaitForUpdate_Call
func (*MockFSMUpdater_WaitForUpdate_Call) Run ¶
func (_c *MockFSMUpdater_WaitForUpdate_Call) Run(run func(ctx context.Context, schemaVersion uint64)) *MockFSMUpdater_WaitForUpdate_Call
func (*MockFSMUpdater_WaitForUpdate_Call) RunAndReturn ¶
func (_c *MockFSMUpdater_WaitForUpdate_Call) RunAndReturn(run func(context.Context, uint64) error) *MockFSMUpdater_WaitForUpdate_Call
type MockManager ¶
MockManager is an autogenerated mock type for the Manager type
func NewMockManager ¶
func NewMockManager(t interface {
mock.TestingT
Cleanup(func())
}) *MockManager
NewMockManager creates a new instance of MockManager. 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 (*MockManager) ApplyReplicationScalePlan ¶ added in v1.31.20
func (_m *MockManager) ApplyReplicationScalePlan(ctx context.Context, scalePlan api.ReplicationScalePlan) ([]strfmt.UUID, error)
ApplyReplicationScalePlan provides a mock function with given fields: ctx, scalePlan
func (*MockManager) CancelReplication ¶
CancelReplication provides a mock function with given fields: ctx, uuid
func (*MockManager) DeleteAllReplications ¶
func (_m *MockManager) DeleteAllReplications(ctx context.Context) error
DeleteAllReplications provides a mock function with given fields: ctx
func (*MockManager) DeleteReplication ¶
DeleteReplication provides a mock function with given fields: ctx, uuid
func (*MockManager) DeleteReplicationsByCollection ¶
func (_m *MockManager) DeleteReplicationsByCollection(ctx context.Context, collection string) error
DeleteReplicationsByCollection provides a mock function with given fields: ctx, collection
func (*MockManager) DeleteReplicationsByTenants ¶
func (_m *MockManager) DeleteReplicationsByTenants(ctx context.Context, collection string, tenants []string) error
DeleteReplicationsByTenants provides a mock function with given fields: ctx, collection, tenants
func (*MockManager) EXPECT ¶
func (_m *MockManager) EXPECT() *MockManager_Expecter
func (*MockManager) ForceDeleteAllReplications ¶
func (_m *MockManager) ForceDeleteAllReplications(ctx context.Context) error
ForceDeleteAllReplications provides a mock function with given fields: ctx
func (*MockManager) ForceDeleteReplicationByUuid ¶
ForceDeleteReplicationByUuid provides a mock function with given fields: ctx, uuid
func (*MockManager) ForceDeleteReplicationsByCollection ¶
func (_m *MockManager) ForceDeleteReplicationsByCollection(ctx context.Context, collection string) error
ForceDeleteReplicationsByCollection provides a mock function with given fields: ctx, collection
func (*MockManager) ForceDeleteReplicationsByCollectionAndShard ¶
func (_m *MockManager) ForceDeleteReplicationsByCollectionAndShard(ctx context.Context, collection string, shard string) error
ForceDeleteReplicationsByCollectionAndShard provides a mock function with given fields: ctx, collection, shard
func (*MockManager) ForceDeleteReplicationsByTargetNode ¶
func (_m *MockManager) ForceDeleteReplicationsByTargetNode(ctx context.Context, node string) error
ForceDeleteReplicationsByTargetNode provides a mock function with given fields: ctx, node
func (*MockManager) GetAllReplicationDetails ¶
func (_m *MockManager) GetAllReplicationDetails(ctx context.Context) ([]api.ReplicationDetailsResponse, error)
GetAllReplicationDetails provides a mock function with given fields: ctx
func (*MockManager) GetReplicationDetailsByCollection ¶
func (_m *MockManager) GetReplicationDetailsByCollection(ctx context.Context, collection string) ([]api.ReplicationDetailsResponse, error)
GetReplicationDetailsByCollection provides a mock function with given fields: ctx, collection
func (*MockManager) GetReplicationDetailsByCollectionAndShard ¶
func (_m *MockManager) GetReplicationDetailsByCollectionAndShard(ctx context.Context, collection string, shard string) ([]api.ReplicationDetailsResponse, error)
GetReplicationDetailsByCollectionAndShard provides a mock function with given fields: ctx, collection, shard
func (*MockManager) GetReplicationDetailsByReplicationId ¶
func (_m *MockManager) GetReplicationDetailsByReplicationId(ctx context.Context, uuid strfmt.UUID) (api.ReplicationDetailsResponse, error)
GetReplicationDetailsByReplicationId provides a mock function with given fields: ctx, uuid
func (*MockManager) GetReplicationDetailsByTargetNode ¶
func (_m *MockManager) GetReplicationDetailsByTargetNode(ctx context.Context, node string) ([]api.ReplicationDetailsResponse, error)
GetReplicationDetailsByTargetNode provides a mock function with given fields: ctx, node
func (*MockManager) GetReplicationScalePlan ¶ added in v1.31.20
func (_m *MockManager) GetReplicationScalePlan(ctx context.Context, collection string, replicationFactor int) (api.ReplicationScalePlan, error)
GetReplicationScalePlan provides a mock function with given fields: ctx, collection, replicationFactor
func (*MockManager) QueryShardingStateByCollection ¶
func (_m *MockManager) QueryShardingStateByCollection(ctx context.Context, collection string) (api.ShardingState, error)
QueryShardingStateByCollection provides a mock function with given fields: ctx, collection
func (*MockManager) QueryShardingStateByCollectionAndShard ¶
func (_m *MockManager) QueryShardingStateByCollectionAndShard(ctx context.Context, collection string, shard string) (api.ShardingState, error)
QueryShardingStateByCollectionAndShard provides a mock function with given fields: ctx, collection, shard
func (*MockManager) ReplicationReplicateReplica ¶
func (_m *MockManager) ReplicationReplicateReplica(ctx context.Context, opId strfmt.UUID, sourceNode string, sourceCollection string, sourceShard string, targetNode string, transferType string) error
ReplicationReplicateReplica provides a mock function with given fields: ctx, opId, sourceNode, sourceCollection, sourceShard, targetNode, transferType
type MockManager_ApplyReplicationScalePlan_Call ¶ added in v1.31.20
MockManager_ApplyReplicationScalePlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyReplicationScalePlan'
func (*MockManager_ApplyReplicationScalePlan_Call) Return ¶ added in v1.31.20
func (_c *MockManager_ApplyReplicationScalePlan_Call) Return(_a0 []strfmt.UUID, _a1 error) *MockManager_ApplyReplicationScalePlan_Call
func (*MockManager_ApplyReplicationScalePlan_Call) Run ¶ added in v1.31.20
func (_c *MockManager_ApplyReplicationScalePlan_Call) Run(run func(ctx context.Context, scalePlan api.ReplicationScalePlan)) *MockManager_ApplyReplicationScalePlan_Call
func (*MockManager_ApplyReplicationScalePlan_Call) RunAndReturn ¶ added in v1.31.20
func (_c *MockManager_ApplyReplicationScalePlan_Call) RunAndReturn(run func(context.Context, api.ReplicationScalePlan) ([]strfmt.UUID, error)) *MockManager_ApplyReplicationScalePlan_Call
type MockManager_CancelReplication_Call ¶
MockManager_CancelReplication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelReplication'
func (*MockManager_CancelReplication_Call) Return ¶
func (_c *MockManager_CancelReplication_Call) Return(_a0 error) *MockManager_CancelReplication_Call
func (*MockManager_CancelReplication_Call) Run ¶
func (_c *MockManager_CancelReplication_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_CancelReplication_Call
func (*MockManager_CancelReplication_Call) RunAndReturn ¶
func (_c *MockManager_CancelReplication_Call) RunAndReturn(run func(context.Context, strfmt.UUID) error) *MockManager_CancelReplication_Call
type MockManager_DeleteAllReplications_Call ¶
MockManager_DeleteAllReplications_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAllReplications'
func (*MockManager_DeleteAllReplications_Call) Return ¶
func (_c *MockManager_DeleteAllReplications_Call) Return(_a0 error) *MockManager_DeleteAllReplications_Call
func (*MockManager_DeleteAllReplications_Call) Run ¶
func (_c *MockManager_DeleteAllReplications_Call) Run(run func(ctx context.Context)) *MockManager_DeleteAllReplications_Call
func (*MockManager_DeleteAllReplications_Call) RunAndReturn ¶
func (_c *MockManager_DeleteAllReplications_Call) RunAndReturn(run func(context.Context) error) *MockManager_DeleteAllReplications_Call
type MockManager_DeleteReplication_Call ¶
MockManager_DeleteReplication_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteReplication'
func (*MockManager_DeleteReplication_Call) Return ¶
func (_c *MockManager_DeleteReplication_Call) Return(_a0 error) *MockManager_DeleteReplication_Call
func (*MockManager_DeleteReplication_Call) Run ¶
func (_c *MockManager_DeleteReplication_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_DeleteReplication_Call
func (*MockManager_DeleteReplication_Call) RunAndReturn ¶
func (_c *MockManager_DeleteReplication_Call) RunAndReturn(run func(context.Context, strfmt.UUID) error) *MockManager_DeleteReplication_Call
type MockManager_DeleteReplicationsByCollection_Call ¶
MockManager_DeleteReplicationsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteReplicationsByCollection'
func (*MockManager_DeleteReplicationsByCollection_Call) Return ¶
func (_c *MockManager_DeleteReplicationsByCollection_Call) Return(_a0 error) *MockManager_DeleteReplicationsByCollection_Call
func (*MockManager_DeleteReplicationsByCollection_Call) Run ¶
func (_c *MockManager_DeleteReplicationsByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_DeleteReplicationsByCollection_Call
func (*MockManager_DeleteReplicationsByCollection_Call) RunAndReturn ¶
func (_c *MockManager_DeleteReplicationsByCollection_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_DeleteReplicationsByCollection_Call
type MockManager_DeleteReplicationsByTenants_Call ¶
MockManager_DeleteReplicationsByTenants_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteReplicationsByTenants'
func (*MockManager_DeleteReplicationsByTenants_Call) Return ¶
func (_c *MockManager_DeleteReplicationsByTenants_Call) Return(_a0 error) *MockManager_DeleteReplicationsByTenants_Call
func (*MockManager_DeleteReplicationsByTenants_Call) Run ¶
func (_c *MockManager_DeleteReplicationsByTenants_Call) Run(run func(ctx context.Context, collection string, tenants []string)) *MockManager_DeleteReplicationsByTenants_Call
func (*MockManager_DeleteReplicationsByTenants_Call) RunAndReturn ¶
func (_c *MockManager_DeleteReplicationsByTenants_Call) RunAndReturn(run func(context.Context, string, []string) error) *MockManager_DeleteReplicationsByTenants_Call
type MockManager_Expecter ¶
type MockManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockManager_Expecter) ApplyReplicationScalePlan ¶ added in v1.31.20
func (_e *MockManager_Expecter) ApplyReplicationScalePlan(ctx interface{}, scalePlan interface{}) *MockManager_ApplyReplicationScalePlan_Call
ApplyReplicationScalePlan is a helper method to define mock.On call
- ctx context.Context
- scalePlan api.ReplicationScalePlan
func (*MockManager_Expecter) CancelReplication ¶
func (_e *MockManager_Expecter) CancelReplication(ctx interface{}, uuid interface{}) *MockManager_CancelReplication_Call
CancelReplication is a helper method to define mock.On call
- ctx context.Context
- uuid strfmt.UUID
func (*MockManager_Expecter) DeleteAllReplications ¶
func (_e *MockManager_Expecter) DeleteAllReplications(ctx interface{}) *MockManager_DeleteAllReplications_Call
DeleteAllReplications is a helper method to define mock.On call
- ctx context.Context
func (*MockManager_Expecter) DeleteReplication ¶
func (_e *MockManager_Expecter) DeleteReplication(ctx interface{}, uuid interface{}) *MockManager_DeleteReplication_Call
DeleteReplication is a helper method to define mock.On call
- ctx context.Context
- uuid strfmt.UUID
func (*MockManager_Expecter) DeleteReplicationsByCollection ¶
func (_e *MockManager_Expecter) DeleteReplicationsByCollection(ctx interface{}, collection interface{}) *MockManager_DeleteReplicationsByCollection_Call
DeleteReplicationsByCollection is a helper method to define mock.On call
- ctx context.Context
- collection string
func (*MockManager_Expecter) DeleteReplicationsByTenants ¶
func (_e *MockManager_Expecter) DeleteReplicationsByTenants(ctx interface{}, collection interface{}, tenants interface{}) *MockManager_DeleteReplicationsByTenants_Call
DeleteReplicationsByTenants is a helper method to define mock.On call
- ctx context.Context
- collection string
- tenants []string
func (*MockManager_Expecter) ForceDeleteAllReplications ¶
func (_e *MockManager_Expecter) ForceDeleteAllReplications(ctx interface{}) *MockManager_ForceDeleteAllReplications_Call
ForceDeleteAllReplications is a helper method to define mock.On call
- ctx context.Context
func (*MockManager_Expecter) ForceDeleteReplicationByUuid ¶
func (_e *MockManager_Expecter) ForceDeleteReplicationByUuid(ctx interface{}, uuid interface{}) *MockManager_ForceDeleteReplicationByUuid_Call
ForceDeleteReplicationByUuid is a helper method to define mock.On call
- ctx context.Context
- uuid strfmt.UUID
func (*MockManager_Expecter) ForceDeleteReplicationsByCollection ¶
func (_e *MockManager_Expecter) ForceDeleteReplicationsByCollection(ctx interface{}, collection interface{}) *MockManager_ForceDeleteReplicationsByCollection_Call
ForceDeleteReplicationsByCollection is a helper method to define mock.On call
- ctx context.Context
- collection string
func (*MockManager_Expecter) ForceDeleteReplicationsByCollectionAndShard ¶
func (_e *MockManager_Expecter) ForceDeleteReplicationsByCollectionAndShard(ctx interface{}, collection interface{}, shard interface{}) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
ForceDeleteReplicationsByCollectionAndShard is a helper method to define mock.On call
- ctx context.Context
- collection string
- shard string
func (*MockManager_Expecter) ForceDeleteReplicationsByTargetNode ¶
func (_e *MockManager_Expecter) ForceDeleteReplicationsByTargetNode(ctx interface{}, node interface{}) *MockManager_ForceDeleteReplicationsByTargetNode_Call
ForceDeleteReplicationsByTargetNode is a helper method to define mock.On call
- ctx context.Context
- node string
func (*MockManager_Expecter) GetAllReplicationDetails ¶
func (_e *MockManager_Expecter) GetAllReplicationDetails(ctx interface{}) *MockManager_GetAllReplicationDetails_Call
GetAllReplicationDetails is a helper method to define mock.On call
- ctx context.Context
func (*MockManager_Expecter) GetReplicationDetailsByCollection ¶
func (_e *MockManager_Expecter) GetReplicationDetailsByCollection(ctx interface{}, collection interface{}) *MockManager_GetReplicationDetailsByCollection_Call
GetReplicationDetailsByCollection is a helper method to define mock.On call
- ctx context.Context
- collection string
func (*MockManager_Expecter) GetReplicationDetailsByCollectionAndShard ¶
func (_e *MockManager_Expecter) GetReplicationDetailsByCollectionAndShard(ctx interface{}, collection interface{}, shard interface{}) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
GetReplicationDetailsByCollectionAndShard is a helper method to define mock.On call
- ctx context.Context
- collection string
- shard string
func (*MockManager_Expecter) GetReplicationDetailsByReplicationId ¶
func (_e *MockManager_Expecter) GetReplicationDetailsByReplicationId(ctx interface{}, uuid interface{}) *MockManager_GetReplicationDetailsByReplicationId_Call
GetReplicationDetailsByReplicationId is a helper method to define mock.On call
- ctx context.Context
- uuid strfmt.UUID
func (*MockManager_Expecter) GetReplicationDetailsByTargetNode ¶
func (_e *MockManager_Expecter) GetReplicationDetailsByTargetNode(ctx interface{}, node interface{}) *MockManager_GetReplicationDetailsByTargetNode_Call
GetReplicationDetailsByTargetNode is a helper method to define mock.On call
- ctx context.Context
- node string
func (*MockManager_Expecter) GetReplicationScalePlan ¶ added in v1.31.20
func (_e *MockManager_Expecter) GetReplicationScalePlan(ctx interface{}, collection interface{}, replicationFactor interface{}) *MockManager_GetReplicationScalePlan_Call
GetReplicationScalePlan is a helper method to define mock.On call
- ctx context.Context
- collection string
- replicationFactor int
func (*MockManager_Expecter) QueryShardingStateByCollection ¶
func (_e *MockManager_Expecter) QueryShardingStateByCollection(ctx interface{}, collection interface{}) *MockManager_QueryShardingStateByCollection_Call
QueryShardingStateByCollection is a helper method to define mock.On call
- ctx context.Context
- collection string
func (*MockManager_Expecter) QueryShardingStateByCollectionAndShard ¶
func (_e *MockManager_Expecter) QueryShardingStateByCollectionAndShard(ctx interface{}, collection interface{}, shard interface{}) *MockManager_QueryShardingStateByCollectionAndShard_Call
QueryShardingStateByCollectionAndShard is a helper method to define mock.On call
- ctx context.Context
- collection string
- shard string
func (*MockManager_Expecter) ReplicationReplicateReplica ¶
func (_e *MockManager_Expecter) ReplicationReplicateReplica(ctx interface{}, opId interface{}, sourceNode interface{}, sourceCollection interface{}, sourceShard interface{}, targetNode interface{}, transferType interface{}) *MockManager_ReplicationReplicateReplica_Call
ReplicationReplicateReplica is a helper method to define mock.On call
- ctx context.Context
- opId strfmt.UUID
- sourceNode string
- sourceCollection string
- sourceShard string
- targetNode string
- transferType string
type MockManager_ForceDeleteAllReplications_Call ¶
MockManager_ForceDeleteAllReplications_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteAllReplications'
func (*MockManager_ForceDeleteAllReplications_Call) Return ¶
func (_c *MockManager_ForceDeleteAllReplications_Call) Return(_a0 error) *MockManager_ForceDeleteAllReplications_Call
func (*MockManager_ForceDeleteAllReplications_Call) Run ¶
func (_c *MockManager_ForceDeleteAllReplications_Call) Run(run func(ctx context.Context)) *MockManager_ForceDeleteAllReplications_Call
func (*MockManager_ForceDeleteAllReplications_Call) RunAndReturn ¶
func (_c *MockManager_ForceDeleteAllReplications_Call) RunAndReturn(run func(context.Context) error) *MockManager_ForceDeleteAllReplications_Call
type MockManager_ForceDeleteReplicationByUuid_Call ¶
MockManager_ForceDeleteReplicationByUuid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationByUuid'
func (*MockManager_ForceDeleteReplicationByUuid_Call) Return ¶
func (_c *MockManager_ForceDeleteReplicationByUuid_Call) Return(_a0 error) *MockManager_ForceDeleteReplicationByUuid_Call
func (*MockManager_ForceDeleteReplicationByUuid_Call) Run ¶
func (_c *MockManager_ForceDeleteReplicationByUuid_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_ForceDeleteReplicationByUuid_Call
func (*MockManager_ForceDeleteReplicationByUuid_Call) RunAndReturn ¶
func (_c *MockManager_ForceDeleteReplicationByUuid_Call) RunAndReturn(run func(context.Context, strfmt.UUID) error) *MockManager_ForceDeleteReplicationByUuid_Call
type MockManager_ForceDeleteReplicationsByCollectionAndShard_Call ¶
MockManager_ForceDeleteReplicationsByCollectionAndShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationsByCollectionAndShard'
func (*MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) Run ¶
func (_c *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) Run(run func(ctx context.Context, collection string, shard string)) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
func (*MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) RunAndReturn ¶
func (_c *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) RunAndReturn(run func(context.Context, string, string) error) *MockManager_ForceDeleteReplicationsByCollectionAndShard_Call
type MockManager_ForceDeleteReplicationsByCollection_Call ¶
MockManager_ForceDeleteReplicationsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationsByCollection'
func (*MockManager_ForceDeleteReplicationsByCollection_Call) Run ¶
func (_c *MockManager_ForceDeleteReplicationsByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_ForceDeleteReplicationsByCollection_Call
func (*MockManager_ForceDeleteReplicationsByCollection_Call) RunAndReturn ¶
func (_c *MockManager_ForceDeleteReplicationsByCollection_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_ForceDeleteReplicationsByCollection_Call
type MockManager_ForceDeleteReplicationsByTargetNode_Call ¶
MockManager_ForceDeleteReplicationsByTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationsByTargetNode'
func (*MockManager_ForceDeleteReplicationsByTargetNode_Call) Run ¶
func (_c *MockManager_ForceDeleteReplicationsByTargetNode_Call) Run(run func(ctx context.Context, node string)) *MockManager_ForceDeleteReplicationsByTargetNode_Call
func (*MockManager_ForceDeleteReplicationsByTargetNode_Call) RunAndReturn ¶
func (_c *MockManager_ForceDeleteReplicationsByTargetNode_Call) RunAndReturn(run func(context.Context, string) error) *MockManager_ForceDeleteReplicationsByTargetNode_Call
type MockManager_GetAllReplicationDetails_Call ¶
MockManager_GetAllReplicationDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllReplicationDetails'
func (*MockManager_GetAllReplicationDetails_Call) Return ¶
func (_c *MockManager_GetAllReplicationDetails_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetAllReplicationDetails_Call
func (*MockManager_GetAllReplicationDetails_Call) Run ¶
func (_c *MockManager_GetAllReplicationDetails_Call) Run(run func(ctx context.Context)) *MockManager_GetAllReplicationDetails_Call
func (*MockManager_GetAllReplicationDetails_Call) RunAndReturn ¶
func (_c *MockManager_GetAllReplicationDetails_Call) RunAndReturn(run func(context.Context) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetAllReplicationDetails_Call
type MockManager_GetReplicationDetailsByCollectionAndShard_Call ¶
MockManager_GetReplicationDetailsByCollectionAndShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationDetailsByCollectionAndShard'
func (*MockManager_GetReplicationDetailsByCollectionAndShard_Call) Run ¶
func (_c *MockManager_GetReplicationDetailsByCollectionAndShard_Call) Run(run func(ctx context.Context, collection string, shard string)) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
func (*MockManager_GetReplicationDetailsByCollectionAndShard_Call) RunAndReturn ¶
func (_c *MockManager_GetReplicationDetailsByCollectionAndShard_Call) RunAndReturn(run func(context.Context, string, string) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByCollectionAndShard_Call
type MockManager_GetReplicationDetailsByCollection_Call ¶
MockManager_GetReplicationDetailsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationDetailsByCollection'
func (*MockManager_GetReplicationDetailsByCollection_Call) Return ¶
func (_c *MockManager_GetReplicationDetailsByCollection_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetReplicationDetailsByCollection_Call
func (*MockManager_GetReplicationDetailsByCollection_Call) Run ¶
func (_c *MockManager_GetReplicationDetailsByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_GetReplicationDetailsByCollection_Call
func (*MockManager_GetReplicationDetailsByCollection_Call) RunAndReturn ¶
func (_c *MockManager_GetReplicationDetailsByCollection_Call) RunAndReturn(run func(context.Context, string) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByCollection_Call
type MockManager_GetReplicationDetailsByReplicationId_Call ¶
MockManager_GetReplicationDetailsByReplicationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationDetailsByReplicationId'
func (*MockManager_GetReplicationDetailsByReplicationId_Call) Run ¶
func (_c *MockManager_GetReplicationDetailsByReplicationId_Call) Run(run func(ctx context.Context, uuid strfmt.UUID)) *MockManager_GetReplicationDetailsByReplicationId_Call
func (*MockManager_GetReplicationDetailsByReplicationId_Call) RunAndReturn ¶
func (_c *MockManager_GetReplicationDetailsByReplicationId_Call) RunAndReturn(run func(context.Context, strfmt.UUID) (api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByReplicationId_Call
type MockManager_GetReplicationDetailsByTargetNode_Call ¶
MockManager_GetReplicationDetailsByTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationDetailsByTargetNode'
func (*MockManager_GetReplicationDetailsByTargetNode_Call) Return ¶
func (_c *MockManager_GetReplicationDetailsByTargetNode_Call) Return(_a0 []api.ReplicationDetailsResponse, _a1 error) *MockManager_GetReplicationDetailsByTargetNode_Call
func (*MockManager_GetReplicationDetailsByTargetNode_Call) Run ¶
func (_c *MockManager_GetReplicationDetailsByTargetNode_Call) Run(run func(ctx context.Context, node string)) *MockManager_GetReplicationDetailsByTargetNode_Call
func (*MockManager_GetReplicationDetailsByTargetNode_Call) RunAndReturn ¶
func (_c *MockManager_GetReplicationDetailsByTargetNode_Call) RunAndReturn(run func(context.Context, string) ([]api.ReplicationDetailsResponse, error)) *MockManager_GetReplicationDetailsByTargetNode_Call
type MockManager_GetReplicationScalePlan_Call ¶ added in v1.31.20
MockManager_GetReplicationScalePlan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationScalePlan'
func (*MockManager_GetReplicationScalePlan_Call) Return ¶ added in v1.31.20
func (_c *MockManager_GetReplicationScalePlan_Call) Return(_a0 api.ReplicationScalePlan, _a1 error) *MockManager_GetReplicationScalePlan_Call
func (*MockManager_GetReplicationScalePlan_Call) Run ¶ added in v1.31.20
func (_c *MockManager_GetReplicationScalePlan_Call) Run(run func(ctx context.Context, collection string, replicationFactor int)) *MockManager_GetReplicationScalePlan_Call
func (*MockManager_GetReplicationScalePlan_Call) RunAndReturn ¶ added in v1.31.20
func (_c *MockManager_GetReplicationScalePlan_Call) RunAndReturn(run func(context.Context, string, int) (api.ReplicationScalePlan, error)) *MockManager_GetReplicationScalePlan_Call
type MockManager_QueryShardingStateByCollectionAndShard_Call ¶
MockManager_QueryShardingStateByCollectionAndShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryShardingStateByCollectionAndShard'
func (*MockManager_QueryShardingStateByCollectionAndShard_Call) Return ¶
func (_c *MockManager_QueryShardingStateByCollectionAndShard_Call) Return(_a0 api.ShardingState, _a1 error) *MockManager_QueryShardingStateByCollectionAndShard_Call
func (*MockManager_QueryShardingStateByCollectionAndShard_Call) Run ¶
func (_c *MockManager_QueryShardingStateByCollectionAndShard_Call) Run(run func(ctx context.Context, collection string, shard string)) *MockManager_QueryShardingStateByCollectionAndShard_Call
func (*MockManager_QueryShardingStateByCollectionAndShard_Call) RunAndReturn ¶
func (_c *MockManager_QueryShardingStateByCollectionAndShard_Call) RunAndReturn(run func(context.Context, string, string) (api.ShardingState, error)) *MockManager_QueryShardingStateByCollectionAndShard_Call
type MockManager_QueryShardingStateByCollection_Call ¶
MockManager_QueryShardingStateByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryShardingStateByCollection'
func (*MockManager_QueryShardingStateByCollection_Call) Return ¶
func (_c *MockManager_QueryShardingStateByCollection_Call) Return(_a0 api.ShardingState, _a1 error) *MockManager_QueryShardingStateByCollection_Call
func (*MockManager_QueryShardingStateByCollection_Call) Run ¶
func (_c *MockManager_QueryShardingStateByCollection_Call) Run(run func(ctx context.Context, collection string)) *MockManager_QueryShardingStateByCollection_Call
func (*MockManager_QueryShardingStateByCollection_Call) RunAndReturn ¶
func (_c *MockManager_QueryShardingStateByCollection_Call) RunAndReturn(run func(context.Context, string) (api.ShardingState, error)) *MockManager_QueryShardingStateByCollection_Call
type MockManager_ReplicationReplicateReplica_Call ¶
MockManager_ReplicationReplicateReplica_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationReplicateReplica'
func (*MockManager_ReplicationReplicateReplica_Call) Return ¶
func (_c *MockManager_ReplicationReplicateReplica_Call) Return(_a0 error) *MockManager_ReplicationReplicateReplica_Call
func (*MockManager_ReplicationReplicateReplica_Call) RunAndReturn ¶
type MockReplicaCopier ¶
MockReplicaCopier is an autogenerated mock type for the ReplicaCopier type
func NewMockReplicaCopier ¶
func NewMockReplicaCopier(t interface {
mock.TestingT
Cleanup(func())
}) *MockReplicaCopier
NewMockReplicaCopier creates a new instance of MockReplicaCopier. 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 (*MockReplicaCopier) AddAsyncReplicationTargetNode ¶
func (_m *MockReplicaCopier) AddAsyncReplicationTargetNode(ctx context.Context, targetNodeOverride additional.AsyncReplicationTargetNodeOverride, schemaVersion uint64) error
AddAsyncReplicationTargetNode provides a mock function with given fields: ctx, targetNodeOverride, schemaVersion
func (*MockReplicaCopier) AsyncReplicationStatus ¶
func (_m *MockReplicaCopier) AsyncReplicationStatus(ctx context.Context, srcNodeId string, targetNodeId string, collectionName string, shardName string) (models.AsyncReplicationStatus, error)
AsyncReplicationStatus provides a mock function with given fields: ctx, srcNodeId, targetNodeId, collectionName, shardName
func (*MockReplicaCopier) CopyReplicaFiles ¶
func (_m *MockReplicaCopier) CopyReplicaFiles(ctx context.Context, sourceNode string, sourceCollection string, sourceShard string, schemaVersion uint64) error
CopyReplicaFiles provides a mock function with given fields: ctx, sourceNode, sourceCollection, sourceShard, schemaVersion
func (*MockReplicaCopier) EXPECT ¶
func (_m *MockReplicaCopier) EXPECT() *MockReplicaCopier_Expecter
func (*MockReplicaCopier) InitAsyncReplicationLocally ¶
func (_m *MockReplicaCopier) InitAsyncReplicationLocally(ctx context.Context, collectionName string, shardName string) error
InitAsyncReplicationLocally provides a mock function with given fields: ctx, collectionName, shardName
func (*MockReplicaCopier) LoadLocalShard ¶
func (_m *MockReplicaCopier) LoadLocalShard(ctx context.Context, collectionName string, shardName string) error
LoadLocalShard provides a mock function with given fields: ctx, collectionName, shardName
func (*MockReplicaCopier) RemoveAsyncReplicationTargetNode ¶
func (_m *MockReplicaCopier) RemoveAsyncReplicationTargetNode(ctx context.Context, targetNodeOverride additional.AsyncReplicationTargetNodeOverride) error
RemoveAsyncReplicationTargetNode provides a mock function with given fields: ctx, targetNodeOverride
func (*MockReplicaCopier) RevertAsyncReplicationLocally ¶
func (_m *MockReplicaCopier) RevertAsyncReplicationLocally(ctx context.Context, collectionName string, shardName string) error
RevertAsyncReplicationLocally provides a mock function with given fields: ctx, collectionName, shardName
type MockReplicaCopier_AddAsyncReplicationTargetNode_Call ¶
MockReplicaCopier_AddAsyncReplicationTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAsyncReplicationTargetNode'
func (*MockReplicaCopier_AddAsyncReplicationTargetNode_Call) Run ¶
func (_c *MockReplicaCopier_AddAsyncReplicationTargetNode_Call) Run(run func(ctx context.Context, targetNodeOverride additional.AsyncReplicationTargetNodeOverride, schemaVersion uint64)) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
func (*MockReplicaCopier_AddAsyncReplicationTargetNode_Call) RunAndReturn ¶
func (_c *MockReplicaCopier_AddAsyncReplicationTargetNode_Call) RunAndReturn(run func(context.Context, additional.AsyncReplicationTargetNodeOverride, uint64) error) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
type MockReplicaCopier_AsyncReplicationStatus_Call ¶
MockReplicaCopier_AsyncReplicationStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AsyncReplicationStatus'
func (*MockReplicaCopier_AsyncReplicationStatus_Call) Return ¶
func (_c *MockReplicaCopier_AsyncReplicationStatus_Call) Return(_a0 models.AsyncReplicationStatus, _a1 error) *MockReplicaCopier_AsyncReplicationStatus_Call
func (*MockReplicaCopier_AsyncReplicationStatus_Call) Run ¶
func (_c *MockReplicaCopier_AsyncReplicationStatus_Call) Run(run func(ctx context.Context, srcNodeId string, targetNodeId string, collectionName string, shardName string)) *MockReplicaCopier_AsyncReplicationStatus_Call
func (*MockReplicaCopier_AsyncReplicationStatus_Call) RunAndReturn ¶
func (_c *MockReplicaCopier_AsyncReplicationStatus_Call) RunAndReturn(run func(context.Context, string, string, string, string) (models.AsyncReplicationStatus, error)) *MockReplicaCopier_AsyncReplicationStatus_Call
type MockReplicaCopier_CopyReplicaFiles_Call ¶
MockReplicaCopier_CopyReplicaFiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyReplicaFiles'
func (*MockReplicaCopier_CopyReplicaFiles_Call) Return ¶
func (_c *MockReplicaCopier_CopyReplicaFiles_Call) Return(_a0 error) *MockReplicaCopier_CopyReplicaFiles_Call
func (*MockReplicaCopier_CopyReplicaFiles_Call) Run ¶
func (_c *MockReplicaCopier_CopyReplicaFiles_Call) Run(run func(ctx context.Context, sourceNode string, sourceCollection string, sourceShard string, schemaVersion uint64)) *MockReplicaCopier_CopyReplicaFiles_Call
func (*MockReplicaCopier_CopyReplicaFiles_Call) RunAndReturn ¶
func (_c *MockReplicaCopier_CopyReplicaFiles_Call) RunAndReturn(run func(context.Context, string, string, string, uint64) error) *MockReplicaCopier_CopyReplicaFiles_Call
type MockReplicaCopier_Expecter ¶
type MockReplicaCopier_Expecter struct {
// contains filtered or unexported fields
}
func (*MockReplicaCopier_Expecter) AddAsyncReplicationTargetNode ¶
func (_e *MockReplicaCopier_Expecter) AddAsyncReplicationTargetNode(ctx interface{}, targetNodeOverride interface{}, schemaVersion interface{}) *MockReplicaCopier_AddAsyncReplicationTargetNode_Call
AddAsyncReplicationTargetNode is a helper method to define mock.On call
- ctx context.Context
- targetNodeOverride additional.AsyncReplicationTargetNodeOverride
- schemaVersion uint64
func (*MockReplicaCopier_Expecter) AsyncReplicationStatus ¶
func (_e *MockReplicaCopier_Expecter) AsyncReplicationStatus(ctx interface{}, srcNodeId interface{}, targetNodeId interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_AsyncReplicationStatus_Call
AsyncReplicationStatus is a helper method to define mock.On call
- ctx context.Context
- srcNodeId string
- targetNodeId string
- collectionName string
- shardName string
func (*MockReplicaCopier_Expecter) CopyReplicaFiles ¶
func (_e *MockReplicaCopier_Expecter) CopyReplicaFiles(ctx interface{}, sourceNode interface{}, sourceCollection interface{}, sourceShard interface{}, schemaVersion interface{}) *MockReplicaCopier_CopyReplicaFiles_Call
CopyReplicaFiles is a helper method to define mock.On call
- ctx context.Context
- sourceNode string
- sourceCollection string
- sourceShard string
- schemaVersion uint64
func (*MockReplicaCopier_Expecter) InitAsyncReplicationLocally ¶
func (_e *MockReplicaCopier_Expecter) InitAsyncReplicationLocally(ctx interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_InitAsyncReplicationLocally_Call
InitAsyncReplicationLocally is a helper method to define mock.On call
- ctx context.Context
- collectionName string
- shardName string
func (*MockReplicaCopier_Expecter) LoadLocalShard ¶
func (_e *MockReplicaCopier_Expecter) LoadLocalShard(ctx interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_LoadLocalShard_Call
LoadLocalShard is a helper method to define mock.On call
- ctx context.Context
- collectionName string
- shardName string
func (*MockReplicaCopier_Expecter) RemoveAsyncReplicationTargetNode ¶
func (_e *MockReplicaCopier_Expecter) RemoveAsyncReplicationTargetNode(ctx interface{}, targetNodeOverride interface{}) *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
RemoveAsyncReplicationTargetNode is a helper method to define mock.On call
- ctx context.Context
- targetNodeOverride additional.AsyncReplicationTargetNodeOverride
func (*MockReplicaCopier_Expecter) RevertAsyncReplicationLocally ¶
func (_e *MockReplicaCopier_Expecter) RevertAsyncReplicationLocally(ctx interface{}, collectionName interface{}, shardName interface{}) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
RevertAsyncReplicationLocally is a helper method to define mock.On call
- ctx context.Context
- collectionName string
- shardName string
type MockReplicaCopier_InitAsyncReplicationLocally_Call ¶
MockReplicaCopier_InitAsyncReplicationLocally_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitAsyncReplicationLocally'
func (*MockReplicaCopier_InitAsyncReplicationLocally_Call) Run ¶
func (_c *MockReplicaCopier_InitAsyncReplicationLocally_Call) Run(run func(ctx context.Context, collectionName string, shardName string)) *MockReplicaCopier_InitAsyncReplicationLocally_Call
func (*MockReplicaCopier_InitAsyncReplicationLocally_Call) RunAndReturn ¶
func (_c *MockReplicaCopier_InitAsyncReplicationLocally_Call) RunAndReturn(run func(context.Context, string, string) error) *MockReplicaCopier_InitAsyncReplicationLocally_Call
type MockReplicaCopier_LoadLocalShard_Call ¶
MockReplicaCopier_LoadLocalShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadLocalShard'
func (*MockReplicaCopier_LoadLocalShard_Call) Return ¶
func (_c *MockReplicaCopier_LoadLocalShard_Call) Return(_a0 error) *MockReplicaCopier_LoadLocalShard_Call
func (*MockReplicaCopier_LoadLocalShard_Call) Run ¶
func (_c *MockReplicaCopier_LoadLocalShard_Call) Run(run func(ctx context.Context, collectionName string, shardName string)) *MockReplicaCopier_LoadLocalShard_Call
func (*MockReplicaCopier_LoadLocalShard_Call) RunAndReturn ¶
func (_c *MockReplicaCopier_LoadLocalShard_Call) RunAndReturn(run func(context.Context, string, string) error) *MockReplicaCopier_LoadLocalShard_Call
type MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call ¶
MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAsyncReplicationTargetNode'
func (*MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) Run ¶
func (_c *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) Run(run func(ctx context.Context, targetNodeOverride additional.AsyncReplicationTargetNodeOverride)) *MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call
func (*MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) RunAndReturn ¶
type MockReplicaCopier_RevertAsyncReplicationLocally_Call ¶
MockReplicaCopier_RevertAsyncReplicationLocally_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevertAsyncReplicationLocally'
func (*MockReplicaCopier_RevertAsyncReplicationLocally_Call) Run ¶
func (_c *MockReplicaCopier_RevertAsyncReplicationLocally_Call) Run(run func(ctx context.Context, collectionName string, shardName string)) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
func (*MockReplicaCopier_RevertAsyncReplicationLocally_Call) RunAndReturn ¶
func (_c *MockReplicaCopier_RevertAsyncReplicationLocally_Call) RunAndReturn(run func(context.Context, string, string) error) *MockReplicaCopier_RevertAsyncReplicationLocally_Call
type MockReplicationFSMReader ¶
MockReplicationFSMReader is an autogenerated mock type for the ReplicationFSMReader type
func NewMockReplicationFSMReader ¶
func NewMockReplicationFSMReader(t interface {
mock.TestingT
Cleanup(func())
}) *MockReplicationFSMReader
NewMockReplicationFSMReader creates a new instance of MockReplicationFSMReader. 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 (*MockReplicationFSMReader) EXPECT ¶
func (_m *MockReplicationFSMReader) EXPECT() *MockReplicationFSMReader_Expecter
func (*MockReplicationFSMReader) FilterOneShardReplicasRead ¶
func (_m *MockReplicationFSMReader) FilterOneShardReplicasRead(collection string, shard string, shardReplicasLocation []string) []string
FilterOneShardReplicasRead provides a mock function with given fields: collection, shard, shardReplicasLocation
func (*MockReplicationFSMReader) FilterOneShardReplicasWrite ¶
func (_m *MockReplicationFSMReader) FilterOneShardReplicasWrite(collection string, shard string, shardReplicasLocation []string) ([]string, []string)
FilterOneShardReplicasWrite provides a mock function with given fields: collection, shard, shardReplicasLocation
type MockReplicationFSMReader_Expecter ¶
type MockReplicationFSMReader_Expecter struct {
// contains filtered or unexported fields
}
func (*MockReplicationFSMReader_Expecter) FilterOneShardReplicasRead ¶
func (_e *MockReplicationFSMReader_Expecter) FilterOneShardReplicasRead(collection interface{}, shard interface{}, shardReplicasLocation interface{}) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
FilterOneShardReplicasRead is a helper method to define mock.On call
- collection string
- shard string
- shardReplicasLocation []string
func (*MockReplicationFSMReader_Expecter) FilterOneShardReplicasWrite ¶
func (_e *MockReplicationFSMReader_Expecter) FilterOneShardReplicasWrite(collection interface{}, shard interface{}, shardReplicasLocation interface{}) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
FilterOneShardReplicasWrite is a helper method to define mock.On call
- collection string
- shard string
- shardReplicasLocation []string
type MockReplicationFSMReader_FilterOneShardReplicasRead_Call ¶
MockReplicationFSMReader_FilterOneShardReplicasRead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOneShardReplicasRead'
func (*MockReplicationFSMReader_FilterOneShardReplicasRead_Call) Run ¶
func (_c *MockReplicationFSMReader_FilterOneShardReplicasRead_Call) Run(run func(collection string, shard string, shardReplicasLocation []string)) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
func (*MockReplicationFSMReader_FilterOneShardReplicasRead_Call) RunAndReturn ¶
func (_c *MockReplicationFSMReader_FilterOneShardReplicasRead_Call) RunAndReturn(run func(string, string, []string) []string) *MockReplicationFSMReader_FilterOneShardReplicasRead_Call
type MockReplicationFSMReader_FilterOneShardReplicasWrite_Call ¶
MockReplicationFSMReader_FilterOneShardReplicasWrite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOneShardReplicasWrite'
func (*MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Return ¶
func (_c *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Return(_a0 []string, _a1 []string) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
func (*MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Run ¶
func (_c *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Run(run func(collection string, shard string, shardReplicasLocation []string)) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
func (*MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) RunAndReturn ¶
func (_c *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) RunAndReturn(run func(string, string, []string) ([]string, []string)) *MockReplicationFSMReader_FilterOneShardReplicasWrite_Call
type ReplicaCopier ¶
type ReplicaCopier interface {
// CopyReplicaFiles see cluster/replication/copier.Copier.CopyReplicaFiles
CopyReplicaFiles(ctx context.Context, sourceNode string, sourceCollection string, sourceShard string, schemaVersion uint64) error
// LoadLocalShard see cluster/replication/copier.Copier.LoadLocalShard
LoadLocalShard(ctx context.Context, collectionName, shardName string) error
// InitAsyncReplicationLocally see cluster/replication/copier.Copier.InitAsyncReplicationLocally
InitAsyncReplicationLocally(ctx context.Context, collectionName, shardName string) error
// RevertAsyncReplicationLocally see cluster/replication/copier.Copier.RevertAsyncReplicationLocally
RevertAsyncReplicationLocally(ctx context.Context, collectionName, shardName string) error
// AddAsyncReplicationTargetNode see cluster/replication/copier.Copier.AddAsyncReplicationTargetNode
AddAsyncReplicationTargetNode(ctx context.Context, targetNodeOverride additional.AsyncReplicationTargetNodeOverride, schemaVersion uint64) error
// RemoveAsyncReplicationTargetNode see cluster/replication/copier.Copier.RemoveAsyncReplicationTargetNode
RemoveAsyncReplicationTargetNode(ctx context.Context, targetNodeOverride additional.AsyncReplicationTargetNodeOverride) error
// AsyncReplicationStats see cluster/replication/copier.Copier.AsyncReplicationStatus
AsyncReplicationStatus(ctx context.Context, srcNodeId, targetNodeId, collectionName, shardName string) (models.AsyncReplicationStatus, error)
}
ReplicaCopier see cluster/replication/copier.Copier
type ReplicationFSMReader ¶
type ReplicationFSMReader interface {
// FilterOneShardReplicasRead returns the read and write replicas for a given shard
// It returns a tuple of readReplicas
FilterOneShardReplicasRead(collection string, shard string, shardReplicasLocation []string) []string
// FilterOneShardReplicasWrite returns the write replicas for a given shard
// It returns a tuple of (writeReplicas, additionalWriteReplicas)
FilterOneShardReplicasWrite(collection string, shard string, shardReplicasLocation []string) ([]string, []string)
}