cluster

package
v0.10.3-0...-54aaeda Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

delegator package contains the logic of shard delegator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	GetWorker(ctx context.Context, nodeID int64) (Worker, error)
}

Manager is the interface for worker manager.

func NewWorkerManager

func NewWorkerManager(builder WorkerBuilder) Manager

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

func (_m *MockManager) EXPECT() *MockManager_Expecter

func (*MockManager) GetWorker

func (_m *MockManager) GetWorker(ctx context.Context, nodeID int64) (Worker, error)

GetWorker provides a mock function with given fields: ctx, nodeID

type MockManager_Expecter

type MockManager_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockManager_Expecter) GetWorker

func (_e *MockManager_Expecter) GetWorker(ctx interface{}, nodeID interface{}) *MockManager_GetWorker_Call

GetWorker is a helper method to define mock.On call

  • ctx context.Context
  • nodeID int64

type MockManager_GetWorker_Call

type MockManager_GetWorker_Call struct {
	*mock.Call
}

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

func (*MockManager_GetWorker_Call) Return

func (*MockManager_GetWorker_Call) Run

func (*MockManager_GetWorker_Call) RunAndReturn

type MockWorker

type MockWorker struct {
	mock.Mock
}

MockWorker is an autogenerated mock type for the Worker type

func NewMockWorker

func NewMockWorker(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockWorker

NewMockWorker creates a new instance of MockWorker. 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 (*MockWorker) Delete

func (_m *MockWorker) Delete(ctx context.Context, req *querypb.DeleteRequest) error

Delete provides a mock function with given fields: ctx, req

func (*MockWorker) DeleteBatch

DeleteBatch provides a mock function with given fields: ctx, req

func (*MockWorker) EXPECT

func (_m *MockWorker) EXPECT() *MockWorker_Expecter

func (*MockWorker) GetStatistics

GetStatistics provides a mock function with given fields: ctx, req

func (*MockWorker) IsHealthy

func (_m *MockWorker) IsHealthy() bool

IsHealthy provides a mock function with given fields:

func (*MockWorker) LoadSegments

func (_m *MockWorker) LoadSegments(_a0 context.Context, _a1 *querypb.LoadSegmentsRequest) error

LoadSegments provides a mock function with given fields: _a0, _a1

func (*MockWorker) QuerySegments

func (_m *MockWorker) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)

QuerySegments provides a mock function with given fields: ctx, req

func (*MockWorker) QueryStreamSegments

func (_m *MockWorker) QueryStreamSegments(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error

QueryStreamSegments provides a mock function with given fields: ctx, req, srv

func (*MockWorker) ReleaseSegments

func (_m *MockWorker) ReleaseSegments(_a0 context.Context, _a1 *querypb.ReleaseSegmentsRequest) error

ReleaseSegments provides a mock function with given fields: _a0, _a1

func (*MockWorker) SearchSegments

func (_m *MockWorker) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)

SearchSegments provides a mock function with given fields: ctx, req

func (*MockWorker) Stop

func (_m *MockWorker) Stop()

Stop provides a mock function with given fields:

type MockWorker_DeleteBatch_Call

type MockWorker_DeleteBatch_Call struct {
	*mock.Call
}

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

func (*MockWorker_DeleteBatch_Call) Return

func (*MockWorker_DeleteBatch_Call) Run

type MockWorker_Delete_Call

type MockWorker_Delete_Call struct {
	*mock.Call
}

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

func (*MockWorker_Delete_Call) Return

func (*MockWorker_Delete_Call) Run

func (*MockWorker_Delete_Call) RunAndReturn

type MockWorker_Expecter

type MockWorker_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockWorker_Expecter) Delete

func (_e *MockWorker_Expecter) Delete(ctx interface{}, req interface{}) *MockWorker_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • req *querypb.DeleteRequest

func (*MockWorker_Expecter) DeleteBatch

func (_e *MockWorker_Expecter) DeleteBatch(ctx interface{}, req interface{}) *MockWorker_DeleteBatch_Call

DeleteBatch is a helper method to define mock.On call

  • ctx context.Context
  • req *querypb.DeleteBatchRequest

func (*MockWorker_Expecter) GetStatistics

func (_e *MockWorker_Expecter) GetStatistics(ctx interface{}, req interface{}) *MockWorker_GetStatistics_Call

GetStatistics is a helper method to define mock.On call

  • ctx context.Context
  • req *querypb.GetStatisticsRequest

func (*MockWorker_Expecter) IsHealthy

IsHealthy is a helper method to define mock.On call

func (*MockWorker_Expecter) LoadSegments

func (_e *MockWorker_Expecter) LoadSegments(_a0 interface{}, _a1 interface{}) *MockWorker_LoadSegments_Call

LoadSegments is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *querypb.LoadSegmentsRequest

func (*MockWorker_Expecter) QuerySegments

func (_e *MockWorker_Expecter) QuerySegments(ctx interface{}, req interface{}) *MockWorker_QuerySegments_Call

QuerySegments is a helper method to define mock.On call

  • ctx context.Context
  • req *querypb.QueryRequest

func (*MockWorker_Expecter) QueryStreamSegments

func (_e *MockWorker_Expecter) QueryStreamSegments(ctx interface{}, req interface{}, srv interface{}) *MockWorker_QueryStreamSegments_Call

QueryStreamSegments is a helper method to define mock.On call

  • ctx context.Context
  • req *querypb.QueryRequest
  • srv streamrpc.QueryStreamServer

func (*MockWorker_Expecter) ReleaseSegments

func (_e *MockWorker_Expecter) ReleaseSegments(_a0 interface{}, _a1 interface{}) *MockWorker_ReleaseSegments_Call

ReleaseSegments is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *querypb.ReleaseSegmentsRequest

func (*MockWorker_Expecter) SearchSegments

func (_e *MockWorker_Expecter) SearchSegments(ctx interface{}, req interface{}) *MockWorker_SearchSegments_Call

SearchSegments is a helper method to define mock.On call

  • ctx context.Context
  • req *querypb.SearchRequest

func (*MockWorker_Expecter) Stop

Stop is a helper method to define mock.On call

type MockWorker_GetStatistics_Call

type MockWorker_GetStatistics_Call struct {
	*mock.Call
}

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

func (*MockWorker_GetStatistics_Call) Return

func (*MockWorker_GetStatistics_Call) Run

type MockWorker_IsHealthy_Call

type MockWorker_IsHealthy_Call struct {
	*mock.Call
}

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

func (*MockWorker_IsHealthy_Call) Return

func (*MockWorker_IsHealthy_Call) Run

func (*MockWorker_IsHealthy_Call) RunAndReturn

func (_c *MockWorker_IsHealthy_Call) RunAndReturn(run func() bool) *MockWorker_IsHealthy_Call

type MockWorker_LoadSegments_Call

type MockWorker_LoadSegments_Call struct {
	*mock.Call
}

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

func (*MockWorker_LoadSegments_Call) Return

func (*MockWorker_LoadSegments_Call) Run

func (*MockWorker_LoadSegments_Call) RunAndReturn

type MockWorker_QuerySegments_Call

type MockWorker_QuerySegments_Call struct {
	*mock.Call
}

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

func (*MockWorker_QuerySegments_Call) Return

func (*MockWorker_QuerySegments_Call) Run

func (*MockWorker_QuerySegments_Call) RunAndReturn

type MockWorker_QueryStreamSegments_Call

type MockWorker_QueryStreamSegments_Call struct {
	*mock.Call
}

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

func (*MockWorker_QueryStreamSegments_Call) Return

func (*MockWorker_QueryStreamSegments_Call) Run

type MockWorker_ReleaseSegments_Call

type MockWorker_ReleaseSegments_Call struct {
	*mock.Call
}

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

func (*MockWorker_ReleaseSegments_Call) Return

func (*MockWorker_ReleaseSegments_Call) Run

func (*MockWorker_ReleaseSegments_Call) RunAndReturn

type MockWorker_SearchSegments_Call

type MockWorker_SearchSegments_Call struct {
	*mock.Call
}

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

func (*MockWorker_SearchSegments_Call) Return

func (*MockWorker_SearchSegments_Call) Run

func (*MockWorker_SearchSegments_Call) RunAndReturn

type MockWorker_Stop_Call

type MockWorker_Stop_Call struct {
	*mock.Call
}

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

func (*MockWorker_Stop_Call) Return

func (*MockWorker_Stop_Call) Run

func (_c *MockWorker_Stop_Call) Run(run func()) *MockWorker_Stop_Call

func (*MockWorker_Stop_Call) RunAndReturn

func (_c *MockWorker_Stop_Call) RunAndReturn(run func()) *MockWorker_Stop_Call

type Worker

Worker is the interface definition for querynode worker role.

func NewPoolingRemoteWorker

func NewPoolingRemoteWorker(fn func() (types.QueryNodeClient, error)) (Worker, error)

func NewRemoteWorker

func NewRemoteWorker(client types.QueryNodeClient) Worker

NewRemoteWorker creates a grpcWorker.

type WorkerBuilder

type WorkerBuilder func(ctx context.Context, nodeID int64) (Worker, error)

WorkerBuilder is function alias to build a worker from NodeID

Jump to

Keyboard shortcuts

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