types

package
v1.32.21 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

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

type MockRemoteIndex struct {
	mock.Mock
}

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

type MockRemoteIndex_AddAsyncReplicationTargetNode_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_AddAsyncReplicationTargetNode_Call) Return

func (*MockRemoteIndex_AddAsyncReplicationTargetNode_Call) Run

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

type MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) Return

func (*MockRemoteIndex_RemoveAsyncReplicationTargetNode_Call) Run

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.

Jump to

Keyboard shortcuts

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