types

package
v1.34.8 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

type MockFSMUpdater struct {
	mock.Mock
}

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 (*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

type MockFSMUpdater_DeleteReplicaFromShard_Call struct {
	*mock.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 (*MockFSMUpdater_DeleteReplicaFromShard_Call) Run

func (*MockFSMUpdater_DeleteReplicaFromShard_Call) RunAndReturn

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

type MockFSMUpdater_ReplicationAddReplicaToShard_Call struct {
	*mock.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 (*MockFSMUpdater_ReplicationAddReplicaToShard_Call) Run

func (*MockFSMUpdater_ReplicationAddReplicaToShard_Call) RunAndReturn

type MockFSMUpdater_ReplicationCancellationComplete_Call

type MockFSMUpdater_ReplicationCancellationComplete_Call struct {
	*mock.Call
}

MockFSMUpdater_ReplicationCancellationComplete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationCancellationComplete'

func (*MockFSMUpdater_ReplicationCancellationComplete_Call) Return

func (*MockFSMUpdater_ReplicationCancellationComplete_Call) Run

func (*MockFSMUpdater_ReplicationCancellationComplete_Call) RunAndReturn

type MockFSMUpdater_ReplicationGetReplicaOpStatus_Call

type MockFSMUpdater_ReplicationGetReplicaOpStatus_Call struct {
	*mock.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 (*MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) Run

func (*MockFSMUpdater_ReplicationGetReplicaOpStatus_Call) RunAndReturn

type MockFSMUpdater_ReplicationRegisterError_Call

type MockFSMUpdater_ReplicationRegisterError_Call struct {
	*mock.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 (*MockFSMUpdater_ReplicationRegisterError_Call) Run

func (*MockFSMUpdater_ReplicationRegisterError_Call) RunAndReturn

type MockFSMUpdater_ReplicationRemoveReplicaOp_Call

type MockFSMUpdater_ReplicationRemoveReplicaOp_Call struct {
	*mock.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 (*MockFSMUpdater_ReplicationRemoveReplicaOp_Call) Run

func (*MockFSMUpdater_ReplicationRemoveReplicaOp_Call) RunAndReturn

type MockFSMUpdater_ReplicationStoreSchemaVersion_Call

type MockFSMUpdater_ReplicationStoreSchemaVersion_Call struct {
	*mock.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 (*MockFSMUpdater_ReplicationStoreSchemaVersion_Call) Run

func (*MockFSMUpdater_ReplicationStoreSchemaVersion_Call) RunAndReturn

type MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call

type MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call struct {
	*mock.Call
}

MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplicationUpdateReplicaOpStatus'

func (*MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) Return

func (*MockFSMUpdater_ReplicationUpdateReplicaOpStatus_Call) Run

type MockFSMUpdater_SyncShard_Call

type MockFSMUpdater_SyncShard_Call struct {
	*mock.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 (*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

type MockFSMUpdater_UpdateTenants_Call

type MockFSMUpdater_UpdateTenants_Call struct {
	*mock.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 (*MockFSMUpdater_UpdateTenants_Call) Run

func (*MockFSMUpdater_UpdateTenants_Call) RunAndReturn

type MockFSMUpdater_WaitForUpdate_Call

type MockFSMUpdater_WaitForUpdate_Call struct {
	*mock.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 (*MockFSMUpdater_WaitForUpdate_Call) Run

func (*MockFSMUpdater_WaitForUpdate_Call) RunAndReturn

type MockManager

type MockManager struct {
	mock.Mock
}

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

func (_m *MockManager) CancelReplication(ctx context.Context, uuid strfmt.UUID) error

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

func (_m *MockManager) DeleteReplication(ctx context.Context, uuid strfmt.UUID) error

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

func (_m *MockManager) ForceDeleteReplicationByUuid(ctx context.Context, uuid strfmt.UUID) error

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

type MockManager_ApplyReplicationScalePlan_Call struct {
	*mock.Call
}

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 (*MockManager_ApplyReplicationScalePlan_Call) Run added in v1.31.20

func (*MockManager_ApplyReplicationScalePlan_Call) RunAndReturn added in v1.31.20

type MockManager_CancelReplication_Call

type MockManager_CancelReplication_Call struct {
	*mock.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 (*MockManager_CancelReplication_Call) Run

func (*MockManager_CancelReplication_Call) RunAndReturn

type MockManager_DeleteAllReplications_Call

type MockManager_DeleteAllReplications_Call struct {
	*mock.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 (*MockManager_DeleteAllReplications_Call) Run

func (*MockManager_DeleteAllReplications_Call) RunAndReturn

type MockManager_DeleteReplication_Call

type MockManager_DeleteReplication_Call struct {
	*mock.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 (*MockManager_DeleteReplication_Call) Run

func (*MockManager_DeleteReplication_Call) RunAndReturn

type MockManager_DeleteReplicationsByCollection_Call

type MockManager_DeleteReplicationsByCollection_Call struct {
	*mock.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 (*MockManager_DeleteReplicationsByCollection_Call) Run

func (*MockManager_DeleteReplicationsByCollection_Call) RunAndReturn

type MockManager_DeleteReplicationsByTenants_Call

type MockManager_DeleteReplicationsByTenants_Call struct {
	*mock.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 (*MockManager_DeleteReplicationsByTenants_Call) Run

func (*MockManager_DeleteReplicationsByTenants_Call) RunAndReturn

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

type MockManager_ForceDeleteAllReplications_Call struct {
	*mock.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 (*MockManager_ForceDeleteAllReplications_Call) Run

func (*MockManager_ForceDeleteAllReplications_Call) RunAndReturn

type MockManager_ForceDeleteReplicationByUuid_Call

type MockManager_ForceDeleteReplicationByUuid_Call struct {
	*mock.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 (*MockManager_ForceDeleteReplicationByUuid_Call) Run

func (*MockManager_ForceDeleteReplicationByUuid_Call) RunAndReturn

type MockManager_ForceDeleteReplicationsByCollectionAndShard_Call

type MockManager_ForceDeleteReplicationsByCollectionAndShard_Call struct {
	*mock.Call
}

MockManager_ForceDeleteReplicationsByCollectionAndShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationsByCollectionAndShard'

func (*MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) Return

func (*MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) Run

func (*MockManager_ForceDeleteReplicationsByCollectionAndShard_Call) RunAndReturn

type MockManager_ForceDeleteReplicationsByCollection_Call

type MockManager_ForceDeleteReplicationsByCollection_Call struct {
	*mock.Call
}

MockManager_ForceDeleteReplicationsByCollection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationsByCollection'

func (*MockManager_ForceDeleteReplicationsByCollection_Call) Return

func (*MockManager_ForceDeleteReplicationsByCollection_Call) Run

func (*MockManager_ForceDeleteReplicationsByCollection_Call) RunAndReturn

type MockManager_ForceDeleteReplicationsByTargetNode_Call

type MockManager_ForceDeleteReplicationsByTargetNode_Call struct {
	*mock.Call
}

MockManager_ForceDeleteReplicationsByTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceDeleteReplicationsByTargetNode'

func (*MockManager_ForceDeleteReplicationsByTargetNode_Call) Return

func (*MockManager_ForceDeleteReplicationsByTargetNode_Call) Run

func (*MockManager_ForceDeleteReplicationsByTargetNode_Call) RunAndReturn

type MockManager_GetAllReplicationDetails_Call

type MockManager_GetAllReplicationDetails_Call struct {
	*mock.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 (*MockManager_GetAllReplicationDetails_Call) Run

func (*MockManager_GetAllReplicationDetails_Call) RunAndReturn

type MockManager_GetReplicationDetailsByCollectionAndShard_Call

type MockManager_GetReplicationDetailsByCollectionAndShard_Call struct {
	*mock.Call
}

MockManager_GetReplicationDetailsByCollectionAndShard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationDetailsByCollectionAndShard'

func (*MockManager_GetReplicationDetailsByCollectionAndShard_Call) Return

func (*MockManager_GetReplicationDetailsByCollectionAndShard_Call) Run

type MockManager_GetReplicationDetailsByCollection_Call

type MockManager_GetReplicationDetailsByCollection_Call struct {
	*mock.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 (*MockManager_GetReplicationDetailsByCollection_Call) Run

func (*MockManager_GetReplicationDetailsByCollection_Call) RunAndReturn

type MockManager_GetReplicationDetailsByReplicationId_Call

type MockManager_GetReplicationDetailsByReplicationId_Call struct {
	*mock.Call
}

MockManager_GetReplicationDetailsByReplicationId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetReplicationDetailsByReplicationId'

func (*MockManager_GetReplicationDetailsByReplicationId_Call) Return

func (*MockManager_GetReplicationDetailsByReplicationId_Call) Run

type MockManager_GetReplicationDetailsByTargetNode_Call

type MockManager_GetReplicationDetailsByTargetNode_Call struct {
	*mock.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 (*MockManager_GetReplicationDetailsByTargetNode_Call) Run

func (*MockManager_GetReplicationDetailsByTargetNode_Call) RunAndReturn

type MockManager_GetReplicationScalePlan_Call added in v1.31.20

type MockManager_GetReplicationScalePlan_Call struct {
	*mock.Call
}

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 (*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

type MockManager_QueryShardingStateByCollectionAndShard_Call

type MockManager_QueryShardingStateByCollectionAndShard_Call struct {
	*mock.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 (*MockManager_QueryShardingStateByCollectionAndShard_Call) Run

func (*MockManager_QueryShardingStateByCollectionAndShard_Call) RunAndReturn

type MockManager_QueryShardingStateByCollection_Call

type MockManager_QueryShardingStateByCollection_Call struct {
	*mock.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 (*MockManager_QueryShardingStateByCollection_Call) Run

func (*MockManager_QueryShardingStateByCollection_Call) RunAndReturn

type MockManager_ReplicationReplicateReplica_Call

type MockManager_ReplicationReplicateReplica_Call struct {
	*mock.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 (*MockManager_ReplicationReplicateReplica_Call) Run

func (_c *MockManager_ReplicationReplicateReplica_Call) Run(run func(ctx context.Context, opId strfmt.UUID, sourceNode string, sourceCollection string, sourceShard string, targetNode string, transferType string)) *MockManager_ReplicationReplicateReplica_Call

func (*MockManager_ReplicationReplicateReplica_Call) RunAndReturn

type MockReplicaCopier

type MockReplicaCopier struct {
	mock.Mock
}

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 (*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

type MockReplicaCopier_AddAsyncReplicationTargetNode_Call struct {
	*mock.Call
}

MockReplicaCopier_AddAsyncReplicationTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAsyncReplicationTargetNode'

func (*MockReplicaCopier_AddAsyncReplicationTargetNode_Call) Return

func (*MockReplicaCopier_AddAsyncReplicationTargetNode_Call) Run

type MockReplicaCopier_AsyncReplicationStatus_Call

type MockReplicaCopier_AsyncReplicationStatus_Call struct {
	*mock.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 (*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

type MockReplicaCopier_CopyReplicaFiles_Call

type MockReplicaCopier_CopyReplicaFiles_Call struct {
	*mock.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 (*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

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

type MockReplicaCopier_InitAsyncReplicationLocally_Call struct {
	*mock.Call
}

MockReplicaCopier_InitAsyncReplicationLocally_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitAsyncReplicationLocally'

func (*MockReplicaCopier_InitAsyncReplicationLocally_Call) Return

func (*MockReplicaCopier_InitAsyncReplicationLocally_Call) Run

func (*MockReplicaCopier_InitAsyncReplicationLocally_Call) RunAndReturn

type MockReplicaCopier_LoadLocalShard_Call

type MockReplicaCopier_LoadLocalShard_Call struct {
	*mock.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 (*MockReplicaCopier_LoadLocalShard_Call) Run

func (*MockReplicaCopier_LoadLocalShard_Call) RunAndReturn

type MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call

type MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call struct {
	*mock.Call
}

MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAsyncReplicationTargetNode'

func (*MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) Return

func (*MockReplicaCopier_RemoveAsyncReplicationTargetNode_Call) Run

type MockReplicaCopier_RevertAsyncReplicationLocally_Call

type MockReplicaCopier_RevertAsyncReplicationLocally_Call struct {
	*mock.Call
}

MockReplicaCopier_RevertAsyncReplicationLocally_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevertAsyncReplicationLocally'

func (*MockReplicaCopier_RevertAsyncReplicationLocally_Call) Return

func (*MockReplicaCopier_RevertAsyncReplicationLocally_Call) Run

func (*MockReplicaCopier_RevertAsyncReplicationLocally_Call) RunAndReturn

type MockReplicationFSMReader

type MockReplicationFSMReader struct {
	mock.Mock
}

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 (*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

type MockReplicationFSMReader_FilterOneShardReplicasRead_Call struct {
	*mock.Call
}

MockReplicationFSMReader_FilterOneShardReplicasRead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOneShardReplicasRead'

func (*MockReplicationFSMReader_FilterOneShardReplicasRead_Call) Return

func (*MockReplicationFSMReader_FilterOneShardReplicasRead_Call) Run

func (*MockReplicationFSMReader_FilterOneShardReplicasRead_Call) RunAndReturn

type MockReplicationFSMReader_FilterOneShardReplicasWrite_Call

type MockReplicationFSMReader_FilterOneShardReplicasWrite_Call struct {
	*mock.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 (*MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) Run

func (*MockReplicationFSMReader_FilterOneShardReplicasWrite_Call) RunAndReturn

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)
}

Jump to

Keyboard shortcuts

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