Documentation
¶
Index ¶
- type DbWrapper
- type MockRemoteIndex
- func (_m *MockRemoteIndex) AddAsyncReplicationTargetNode(ctx context.Context, hostName string, indexName string, shardName string, ...) error
- func (_m *MockRemoteIndex) EXPECT() *MockRemoteIndex_Expecter
- func (_m *MockRemoteIndex) RemoveAsyncReplicationTargetNode(ctx context.Context, hostName string, indexName string, shardName string, ...) error
- type MockRemoteIndex_AddAsyncReplicationTargetNode_Call
- func (_c *MockRemoteIndex_AddAsyncReplicationTargetNode_Call) Return(_a0 error) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
- func (_c *MockRemoteIndex_AddAsyncReplicationTargetNode_Call) Run(...) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
- func (_c *MockRemoteIndex_AddAsyncReplicationTargetNode_Call) RunAndReturn(run func(context.Context, string, string, string, ...) error) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
- type MockRemoteIndex_Expecter
- func (_e *MockRemoteIndex_Expecter) AddAsyncReplicationTargetNode(ctx interface{}, hostName interface{}, indexName interface{}, ...) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
- func (_e *MockRemoteIndex_Expecter) RemoveAsyncReplicationTargetNode(ctx interface{}, hostName interface{}, indexName interface{}, ...) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
- type MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
- func (_c *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) Return(_a0 error) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
- func (_c *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) Run(...) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
- func (_c *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) RunAndReturn(run func(context.Context, string, string, string, ...) error) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
- type RemoteIndex
- type ShardLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbWrapper ¶
type DbWrapper interface {
// GetIndex See adapters/repos/db.Index.GetIndex
GetIndex(name schema.ClassName) *db.Index
// GetOneNodeStatus See adapters/repos/db.DB.GetOneNodeStatus
GetOneNodeStatus(ctx context.Context, nodeName string, className, shardName, output string) (*models.NodeStatus, error)
}
DbWrapper is a type that hides a db.DB, this is used to avoid a circular dependency between the copier and the db package.
type MockRemoteIndex ¶
MockRemoteIndex is an autogenerated mock type for the RemoteIndex type
func NewMockRemoteIndex ¶
func NewMockRemoteIndex(t interface {
mock.TestingT
Cleanup(func())
}) *MockRemoteIndex
NewMockRemoteIndex creates a new instance of MockRemoteIndex. 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 (*MockRemoteIndex) AddAsyncReplicationTargetNode ¶
func (_m *MockRemoteIndex) AddAsyncReplicationTargetNode(ctx context.Context, hostName string, indexName string, shardName string, targetNodeOverride additional.AsyncReplicationTargetNodeOverride, schemaVersion uint64) error
AddAsyncReplicationTargetNode provides a mock function with given fields: ctx, hostName, indexName, shardName, targetNodeOverride, schemaVersion
func (*MockRemoteIndex) EXPECT ¶
func (_m *MockRemoteIndex) EXPECT() *MockRemoteIndex_Expecter
func (*MockRemoteIndex) RemoveAsyncReplicationTargetNode ¶
func (_m *MockRemoteIndex) RemoveAsyncReplicationTargetNode(ctx context.Context, hostName string, indexName string, shardName string, targetNodeOverride additional.AsyncReplicationTargetNodeOverride) error
RemoveAsyncReplicationTargetNode provides a mock function with given fields: ctx, hostName, indexName, shardName, targetNodeOverride
type MockRemoteIndex_AddAsyncReplicationTargetNode_Call ¶
MockRemoteIndex_AddAsyncReplicationTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAsyncReplicationTargetNode'
func (*MockRemoteIndex_AddAsyncReplicationTargetNode_Call) Run ¶
func (_c *MockRemoteIndex_AddAsyncReplicationTargetNode_Call) Run(run func(ctx context.Context, hostName string, indexName string, shardName string, targetNodeOverride additional.AsyncReplicationTargetNodeOverride, schemaVersion uint64)) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
func (*MockRemoteIndex_AddAsyncReplicationTargetNode_Call) RunAndReturn ¶
func (_c *MockRemoteIndex_AddAsyncReplicationTargetNode_Call) RunAndReturn(run func(context.Context, string, string, string, additional.AsyncReplicationTargetNodeOverride, uint64) error) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
type MockRemoteIndex_Expecter ¶
type MockRemoteIndex_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRemoteIndex_Expecter) AddAsyncReplicationTargetNode ¶
func (_e *MockRemoteIndex_Expecter) AddAsyncReplicationTargetNode(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}, targetNodeOverride interface{}, schemaVersion interface{}) *MockRemoteIndex_AddAsyncReplicationTargetNode_Call
AddAsyncReplicationTargetNode is a helper method to define mock.On call
- ctx context.Context
- hostName string
- indexName string
- shardName string
- targetNodeOverride additional.AsyncReplicationTargetNodeOverride
- schemaVersion uint64
func (*MockRemoteIndex_Expecter) RemoveAsyncReplicationTargetNode ¶
func (_e *MockRemoteIndex_Expecter) RemoveAsyncReplicationTargetNode(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}, targetNodeOverride interface{}) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
RemoveAsyncReplicationTargetNode is a helper method to define mock.On call
- ctx context.Context
- hostName string
- indexName string
- shardName string
- targetNodeOverride additional.AsyncReplicationTargetNodeOverride
type MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call ¶
MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAsyncReplicationTargetNode'
func (*MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) Run ¶
func (_c *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) Run(run func(ctx context.Context, hostName string, indexName string, shardName string, targetNodeOverride additional.AsyncReplicationTargetNodeOverride)) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
func (*MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) RunAndReturn ¶
func (_c *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) RunAndReturn(run func(context.Context, string, string, string, additional.AsyncReplicationTargetNodeOverride) error) *MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call
type RemoteIndex ¶
type RemoteIndex interface {
// AddAsyncReplicationTargetNode See adapters/clients.RemoteIndex.AddAsyncReplicationTargetNode
AddAsyncReplicationTargetNode(ctx context.Context,
hostName, indexName, shardName string, targetNodeOverride additional.AsyncReplicationTargetNodeOverride, schemaVersion uint64) error
// RemoveAsyncReplicationTargetNode See adapters/clients.RemoteIndex.RemoveAsyncReplicationTargetNode
RemoveAsyncReplicationTargetNode(ctx context.Context,
hostName, indexName, shardName string, targetNodeOverride additional.AsyncReplicationTargetNodeOverride) error
}
RemoteIndex is a type that can interact with a remote index, this is used to avoid a circular dependency between the copier and the db package.
type ShardLoader ¶
type ShardLoader interface {
// LoadLocalShard See adapters/repos/db.Index.LoadLocalShard
LoadLocalShard(ctx context.Context, name string) error
}
ShardLoader is a type that can load a shard from disk files, this is used to avoid a circular dependency between the copier and the db package.