types

package
v1.31.21 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: BSD-3-Clause Imports: 8 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) GetFile

func (_m *MockRemoteIndex) GetFile(ctx context.Context, hostName string, indexName string, shardName string, fileName string) (io.ReadCloser, error)

GetFile provides a mock function with given fields: ctx, hostName, indexName, shardName, fileName

func (*MockRemoteIndex) GetFileMetadata

func (_m *MockRemoteIndex) GetFileMetadata(ctx context.Context, hostName string, indexName string, shardName string, fileName string) (file.FileMetadata, error)

GetFileMetadata provides a mock function with given fields: ctx, hostName, indexName, shardName, fileName

func (*MockRemoteIndex) ListFiles

func (_m *MockRemoteIndex) ListFiles(ctx context.Context, hostName string, indexName string, shardName string) ([]string, error)

ListFiles provides a mock function with given fields: ctx, hostName, indexName, shardName

func (*MockRemoteIndex) PauseFileActivity

func (_m *MockRemoteIndex) PauseFileActivity(ctx context.Context, hostName string, indexName string, shardName string, schemaVersion uint64) error

PauseFileActivity provides a mock function with given fields: ctx, hostName, indexName, shardName, schemaVersion

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

func (*MockRemoteIndex) ResumeFileActivity

func (_m *MockRemoteIndex) ResumeFileActivity(ctx context.Context, hostName string, indexName string, shardName string) error

ResumeFileActivity provides a mock function with given fields: ctx, hostName, indexName, shardName

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

func (_e *MockRemoteIndex_Expecter) GetFile(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}, fileName interface{}) *MockRemoteIndex_GetFile_Call

GetFile is a helper method to define mock.On call

  • ctx context.Context
  • hostName string
  • indexName string
  • shardName string
  • fileName string

func (*MockRemoteIndex_Expecter) GetFileMetadata

func (_e *MockRemoteIndex_Expecter) GetFileMetadata(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}, fileName interface{}) *MockRemoteIndex_GetFileMetadata_Call

GetFileMetadata is a helper method to define mock.On call

  • ctx context.Context
  • hostName string
  • indexName string
  • shardName string
  • fileName string

func (*MockRemoteIndex_Expecter) ListFiles

func (_e *MockRemoteIndex_Expecter) ListFiles(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}) *MockRemoteIndex_ListFiles_Call

ListFiles is a helper method to define mock.On call

  • ctx context.Context
  • hostName string
  • indexName string
  • shardName string

func (*MockRemoteIndex_Expecter) PauseFileActivity

func (_e *MockRemoteIndex_Expecter) PauseFileActivity(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}, schemaVersion interface{}) *MockRemoteIndex_PauseFileActivity_Call

PauseFileActivity is a helper method to define mock.On call

  • ctx context.Context
  • hostName string
  • indexName string
  • shardName string
  • 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

func (*MockRemoteIndex_Expecter) ResumeFileActivity

func (_e *MockRemoteIndex_Expecter) ResumeFileActivity(ctx interface{}, hostName interface{}, indexName interface{}, shardName interface{}) *MockRemoteIndex_ResumeFileActivity_Call

ResumeFileActivity is a helper method to define mock.On call

  • ctx context.Context
  • hostName string
  • indexName string
  • shardName string

type MockRemoteIndex_GetFileMetadata_Call

type MockRemoteIndex_GetFileMetadata_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_GetFileMetadata_Call) Return

func (*MockRemoteIndex_GetFileMetadata_Call) Run

func (_c *MockRemoteIndex_GetFileMetadata_Call) Run(run func(ctx context.Context, hostName string, indexName string, shardName string, fileName string)) *MockRemoteIndex_GetFileMetadata_Call

func (*MockRemoteIndex_GetFileMetadata_Call) RunAndReturn

type MockRemoteIndex_GetFile_Call

type MockRemoteIndex_GetFile_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_GetFile_Call) Return

func (*MockRemoteIndex_GetFile_Call) Run

func (_c *MockRemoteIndex_GetFile_Call) Run(run func(ctx context.Context, hostName string, indexName string, shardName string, fileName string)) *MockRemoteIndex_GetFile_Call

func (*MockRemoteIndex_GetFile_Call) RunAndReturn

type MockRemoteIndex_ListFiles_Call

type MockRemoteIndex_ListFiles_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_ListFiles_Call) Return

func (*MockRemoteIndex_ListFiles_Call) Run

func (_c *MockRemoteIndex_ListFiles_Call) Run(run func(ctx context.Context, hostName string, indexName string, shardName string)) *MockRemoteIndex_ListFiles_Call

func (*MockRemoteIndex_ListFiles_Call) RunAndReturn

type MockRemoteIndex_PauseFileActivity_Call

type MockRemoteIndex_PauseFileActivity_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_PauseFileActivity_Call) Return

func (*MockRemoteIndex_PauseFileActivity_Call) Run

func (_c *MockRemoteIndex_PauseFileActivity_Call) Run(run func(ctx context.Context, hostName string, indexName string, shardName string, schemaVersion uint64)) *MockRemoteIndex_PauseFileActivity_Call

func (*MockRemoteIndex_PauseFileActivity_Call) RunAndReturn

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 MockRemoteIndex_ResumeFileActivity_Call

type MockRemoteIndex_ResumeFileActivity_Call struct {
	*mock.Call
}

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

func (*MockRemoteIndex_ResumeFileActivity_Call) Return

func (*MockRemoteIndex_ResumeFileActivity_Call) Run

func (*MockRemoteIndex_ResumeFileActivity_Call) RunAndReturn

type RemoteIndex

type RemoteIndex interface {
	// PauseFileActivity See adapters/clients.RemoteIndex.PauseFileActivity
	PauseFileActivity(ctx context.Context, hostName, indexName, shardName string, schemaVersion uint64) error
	// ResumeFileActivity See adapters/clients.RemoteIndex.ResumeFileActivity
	ResumeFileActivity(ctx context.Context, hostName, indexName, shardName string) error
	// ListFiles See adapters/clients.RemoteIndex.ListFiles
	ListFiles(ctx context.Context,
		hostName, indexName, shardName string) ([]string, error)
	// GetFileMetadata See adapters/clients.RemoteIndex.GetFileMetadata
	GetFileMetadata(ctx context.Context,
		hostName, indexName, shardName, fileName string) (file.FileMetadata, error)
	// GetFile See adapters/clients.RemoteIndex.GetFile
	GetFile(ctx context.Context,
		hostName, indexName, shardName, fileName string) (io.ReadCloser, error)
	// 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