Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultQueryNodeCreator(ctx context.Context, addr string, nodeID int64) (types.QueryNodeClient, error)
- func WrapErrNodeNotFound(nodeID int64) error
- type Cluster
- type ImmutableNodeInfo
- type Manager
- type MockCluster
- func (_m *MockCluster) EXPECT() *MockCluster_Expecter
- func (_m *MockCluster) GetComponentStates(ctx context.Context, nodeID int64) (*milvuspb.ComponentStates, error)
- func (_m *MockCluster) GetDataDistribution(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)
- func (_m *MockCluster) GetMetrics(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
- func (_m *MockCluster) LoadPartitions(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)
- func (_m *MockCluster) LoadSegments(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
- func (_m *MockCluster) ReleasePartitions(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
- func (_m *MockCluster) ReleaseSegments(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
- func (_m *MockCluster) Start()
- func (_m *MockCluster) Stop()
- func (_m *MockCluster) SyncDistribution(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest) (*commonpb.Status, error)
- func (_m *MockCluster) UnsubDmChannel(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)
- func (_m *MockCluster) WatchDmChannels(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)
- type MockCluster_Expecter
- func (_e *MockCluster_Expecter) GetComponentStates(ctx interface{}, nodeID interface{}) *MockCluster_GetComponentStates_Call
- func (_e *MockCluster_Expecter) GetDataDistribution(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_GetDataDistribution_Call
- func (_e *MockCluster_Expecter) GetMetrics(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_GetMetrics_Call
- func (_e *MockCluster_Expecter) LoadPartitions(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_LoadPartitions_Call
- func (_e *MockCluster_Expecter) LoadSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_LoadSegments_Call
- func (_e *MockCluster_Expecter) ReleasePartitions(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_ReleasePartitions_Call
- func (_e *MockCluster_Expecter) ReleaseSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_ReleaseSegments_Call
- func (_e *MockCluster_Expecter) Start() *MockCluster_Start_Call
- func (_e *MockCluster_Expecter) Stop() *MockCluster_Stop_Call
- func (_e *MockCluster_Expecter) SyncDistribution(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_SyncDistribution_Call
- func (_e *MockCluster_Expecter) UnsubDmChannel(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_UnsubDmChannel_Call
- func (_e *MockCluster_Expecter) WatchDmChannels(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_WatchDmChannels_Call
- type MockCluster_GetComponentStates_Call
- func (_c *MockCluster_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockCluster_GetComponentStates_Call
- func (_c *MockCluster_GetComponentStates_Call) Run(run func(ctx context.Context, nodeID int64)) *MockCluster_GetComponentStates_Call
- func (_c *MockCluster_GetComponentStates_Call) RunAndReturn(run func(context.Context, int64) (*milvuspb.ComponentStates, error)) *MockCluster_GetComponentStates_Call
- type MockCluster_GetDataDistribution_Call
- func (_c *MockCluster_GetDataDistribution_Call) Return(_a0 *querypb.GetDataDistributionResponse, _a1 error) *MockCluster_GetDataDistribution_Call
- func (_c *MockCluster_GetDataDistribution_Call) Run(...) *MockCluster_GetDataDistribution_Call
- func (_c *MockCluster_GetDataDistribution_Call) RunAndReturn(...) *MockCluster_GetDataDistribution_Call
- type MockCluster_GetMetrics_Call
- func (_c *MockCluster_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockCluster_GetMetrics_Call
- func (_c *MockCluster_GetMetrics_Call) Run(run func(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest)) *MockCluster_GetMetrics_Call
- func (_c *MockCluster_GetMetrics_Call) RunAndReturn(...) *MockCluster_GetMetrics_Call
- type MockCluster_LoadPartitions_Call
- type MockCluster_LoadSegments_Call
- func (_c *MockCluster_LoadSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_LoadSegments_Call
- func (_c *MockCluster_LoadSegments_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest)) *MockCluster_LoadSegments_Call
- func (_c *MockCluster_LoadSegments_Call) RunAndReturn(...) *MockCluster_LoadSegments_Call
- type MockCluster_ReleasePartitions_Call
- func (_c *MockCluster_ReleasePartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_ReleasePartitions_Call
- func (_c *MockCluster_ReleasePartitions_Call) Run(...) *MockCluster_ReleasePartitions_Call
- func (_c *MockCluster_ReleasePartitions_Call) RunAndReturn(...) *MockCluster_ReleasePartitions_Call
- type MockCluster_ReleaseSegments_Call
- func (_c *MockCluster_ReleaseSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_ReleaseSegments_Call
- func (_c *MockCluster_ReleaseSegments_Call) Run(...) *MockCluster_ReleaseSegments_Call
- func (_c *MockCluster_ReleaseSegments_Call) RunAndReturn(...) *MockCluster_ReleaseSegments_Call
- type MockCluster_Start_Call
- type MockCluster_Stop_Call
- type MockCluster_SyncDistribution_Call
- func (_c *MockCluster_SyncDistribution_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_SyncDistribution_Call
- func (_c *MockCluster_SyncDistribution_Call) Run(...) *MockCluster_SyncDistribution_Call
- func (_c *MockCluster_SyncDistribution_Call) RunAndReturn(...) *MockCluster_SyncDistribution_Call
- type MockCluster_UnsubDmChannel_Call
- type MockCluster_WatchDmChannels_Call
- func (_c *MockCluster_WatchDmChannels_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_WatchDmChannels_Call
- func (_c *MockCluster_WatchDmChannels_Call) Run(...) *MockCluster_WatchDmChannels_Call
- func (_c *MockCluster_WatchDmChannels_Call) RunAndReturn(...) *MockCluster_WatchDmChannels_Call
- type NodeInfo
- func (n *NodeInfo) Addr() string
- func (n *NodeInfo) ChannelCnt() int
- func (n *NodeInfo) GetState() State
- func (n *NodeInfo) Hostname() string
- func (n *NodeInfo) ID() int64
- func (n *NodeInfo) IsStoppingState() bool
- func (n *NodeInfo) Labels() map[string]string
- func (n *NodeInfo) LastHeartbeat() time.Time
- func (n *NodeInfo) MemCapacity() float64
- func (n *NodeInfo) SegmentCnt() int
- func (n *NodeInfo) SetLastHeartbeat(time time.Time)
- func (n *NodeInfo) SetState(s State)
- func (n *NodeInfo) UpdateStats(opts ...StatsOption)
- func (n *NodeInfo) Version() semver.Version
- type NodeManager
- type QueryCluster
- func (c *QueryCluster) GetComponentStates(ctx context.Context, nodeID int64) (*milvuspb.ComponentStates, error)
- func (c *QueryCluster) GetDataDistribution(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)
- func (c *QueryCluster) GetMetrics(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
- func (c *QueryCluster) LoadPartitions(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)
- func (c *QueryCluster) LoadSegments(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
- func (c *QueryCluster) ReleasePartitions(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
- func (c *QueryCluster) ReleaseSegments(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
- func (c *QueryCluster) Start()
- func (c *QueryCluster) Stop()
- func (c *QueryCluster) SyncDistribution(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest) (*commonpb.Status, error)
- func (c *QueryCluster) UnsubDmChannel(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)
- func (c *QueryCluster) WatchDmChannels(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)
- type QueryNodeCreator
- type State
- type StatsOption
Constants ¶
const ( NormalStateName = "Normal" StoppingStateName = "Stopping" SuspendStateName = "Suspend" )
Variables ¶
var ErrNodeNotFound = errors.New("NodeNotFound")
Functions ¶
func DefaultQueryNodeCreator ¶
func WrapErrNodeNotFound ¶
Types ¶
type Cluster ¶
type Cluster interface { WatchDmChannels(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error) UnsubDmChannel(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error) LoadSegments(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error) ReleaseSegments(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error) LoadPartitions(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error) ReleasePartitions(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error) GetDataDistribution(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error) GetMetrics(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) SyncDistribution(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest) (*commonpb.Status, error) GetComponentStates(ctx context.Context, nodeID int64) (*milvuspb.ComponentStates, error) Start() Stop() }
type ImmutableNodeInfo ¶
type MockCluster ¶
MockCluster is an autogenerated mock type for the Cluster type
func NewMockCluster ¶
func NewMockCluster(t interface { mock.TestingT Cleanup(func()) }) *MockCluster
NewMockCluster creates a new instance of MockCluster. 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 (*MockCluster) EXPECT ¶
func (_m *MockCluster) EXPECT() *MockCluster_Expecter
func (*MockCluster) GetComponentStates ¶
func (_m *MockCluster) GetComponentStates(ctx context.Context, nodeID int64) (*milvuspb.ComponentStates, error)
GetComponentStates provides a mock function with given fields: ctx, nodeID
func (*MockCluster) GetDataDistribution ¶
func (_m *MockCluster) GetDataDistribution(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)
GetDataDistribution provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) GetMetrics ¶
func (_m *MockCluster) GetMetrics(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
GetMetrics provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) LoadPartitions ¶
func (_m *MockCluster) LoadPartitions(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)
LoadPartitions provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) LoadSegments ¶
func (_m *MockCluster) LoadSegments(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
LoadSegments provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) ReleasePartitions ¶
func (_m *MockCluster) ReleasePartitions(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
ReleasePartitions provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) ReleaseSegments ¶
func (_m *MockCluster) ReleaseSegments(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
ReleaseSegments provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) Start ¶
func (_m *MockCluster) Start()
Start provides a mock function with given fields:
func (*MockCluster) Stop ¶
func (_m *MockCluster) Stop()
Stop provides a mock function with given fields:
func (*MockCluster) SyncDistribution ¶
func (_m *MockCluster) SyncDistribution(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest) (*commonpb.Status, error)
SyncDistribution provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) UnsubDmChannel ¶
func (_m *MockCluster) UnsubDmChannel(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)
UnsubDmChannel provides a mock function with given fields: ctx, nodeID, req
func (*MockCluster) WatchDmChannels ¶
func (_m *MockCluster) WatchDmChannels(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)
WatchDmChannels provides a mock function with given fields: ctx, nodeID, req
type MockCluster_Expecter ¶
type MockCluster_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCluster_Expecter) GetComponentStates ¶
func (_e *MockCluster_Expecter) GetComponentStates(ctx interface{}, nodeID interface{}) *MockCluster_GetComponentStates_Call
GetComponentStates is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
func (*MockCluster_Expecter) GetDataDistribution ¶
func (_e *MockCluster_Expecter) GetDataDistribution(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_GetDataDistribution_Call
GetDataDistribution is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.GetDataDistributionRequest
func (*MockCluster_Expecter) GetMetrics ¶
func (_e *MockCluster_Expecter) GetMetrics(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_GetMetrics_Call
GetMetrics is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *milvuspb.GetMetricsRequest
func (*MockCluster_Expecter) LoadPartitions ¶
func (_e *MockCluster_Expecter) LoadPartitions(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_LoadPartitions_Call
LoadPartitions is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.LoadPartitionsRequest
func (*MockCluster_Expecter) LoadSegments ¶
func (_e *MockCluster_Expecter) LoadSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_LoadSegments_Call
LoadSegments is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.LoadSegmentsRequest
func (*MockCluster_Expecter) ReleasePartitions ¶
func (_e *MockCluster_Expecter) ReleasePartitions(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_ReleasePartitions_Call
ReleasePartitions is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.ReleasePartitionsRequest
func (*MockCluster_Expecter) ReleaseSegments ¶
func (_e *MockCluster_Expecter) ReleaseSegments(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_ReleaseSegments_Call
ReleaseSegments is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.ReleaseSegmentsRequest
func (*MockCluster_Expecter) Start ¶
func (_e *MockCluster_Expecter) Start() *MockCluster_Start_Call
Start is a helper method to define mock.On call
func (*MockCluster_Expecter) Stop ¶
func (_e *MockCluster_Expecter) Stop() *MockCluster_Stop_Call
Stop is a helper method to define mock.On call
func (*MockCluster_Expecter) SyncDistribution ¶
func (_e *MockCluster_Expecter) SyncDistribution(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_SyncDistribution_Call
SyncDistribution is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.SyncDistributionRequest
func (*MockCluster_Expecter) UnsubDmChannel ¶
func (_e *MockCluster_Expecter) UnsubDmChannel(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_UnsubDmChannel_Call
UnsubDmChannel is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.UnsubDmChannelRequest
func (*MockCluster_Expecter) WatchDmChannels ¶
func (_e *MockCluster_Expecter) WatchDmChannels(ctx interface{}, nodeID interface{}, req interface{}) *MockCluster_WatchDmChannels_Call
WatchDmChannels is a helper method to define mock.On call
- ctx context.Context
- nodeID int64
- req *querypb.WatchDmChannelsRequest
type MockCluster_GetComponentStates_Call ¶
MockCluster_GetComponentStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetComponentStates'
func (*MockCluster_GetComponentStates_Call) Return ¶
func (_c *MockCluster_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _a1 error) *MockCluster_GetComponentStates_Call
func (*MockCluster_GetComponentStates_Call) Run ¶
func (_c *MockCluster_GetComponentStates_Call) Run(run func(ctx context.Context, nodeID int64)) *MockCluster_GetComponentStates_Call
func (*MockCluster_GetComponentStates_Call) RunAndReturn ¶
func (_c *MockCluster_GetComponentStates_Call) RunAndReturn(run func(context.Context, int64) (*milvuspb.ComponentStates, error)) *MockCluster_GetComponentStates_Call
type MockCluster_GetDataDistribution_Call ¶
MockCluster_GetDataDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDataDistribution'
func (*MockCluster_GetDataDistribution_Call) Return ¶
func (_c *MockCluster_GetDataDistribution_Call) Return(_a0 *querypb.GetDataDistributionResponse, _a1 error) *MockCluster_GetDataDistribution_Call
func (*MockCluster_GetDataDistribution_Call) Run ¶
func (_c *MockCluster_GetDataDistribution_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest)) *MockCluster_GetDataDistribution_Call
func (*MockCluster_GetDataDistribution_Call) RunAndReturn ¶
func (_c *MockCluster_GetDataDistribution_Call) RunAndReturn(run func(context.Context, int64, *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)) *MockCluster_GetDataDistribution_Call
type MockCluster_GetMetrics_Call ¶
MockCluster_GetMetrics_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMetrics'
func (*MockCluster_GetMetrics_Call) Return ¶
func (_c *MockCluster_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 error) *MockCluster_GetMetrics_Call
func (*MockCluster_GetMetrics_Call) Run ¶
func (_c *MockCluster_GetMetrics_Call) Run(run func(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest)) *MockCluster_GetMetrics_Call
func (*MockCluster_GetMetrics_Call) RunAndReturn ¶
func (_c *MockCluster_GetMetrics_Call) RunAndReturn(run func(context.Context, int64, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *MockCluster_GetMetrics_Call
type MockCluster_LoadPartitions_Call ¶
MockCluster_LoadPartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadPartitions'
func (*MockCluster_LoadPartitions_Call) Return ¶
func (_c *MockCluster_LoadPartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_LoadPartitions_Call
func (*MockCluster_LoadPartitions_Call) Run ¶
func (_c *MockCluster_LoadPartitions_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest)) *MockCluster_LoadPartitions_Call
func (*MockCluster_LoadPartitions_Call) RunAndReturn ¶
func (_c *MockCluster_LoadPartitions_Call) RunAndReturn(run func(context.Context, int64, *querypb.LoadPartitionsRequest) (*commonpb.Status, error)) *MockCluster_LoadPartitions_Call
type MockCluster_LoadSegments_Call ¶
MockCluster_LoadSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadSegments'
func (*MockCluster_LoadSegments_Call) Return ¶
func (_c *MockCluster_LoadSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_LoadSegments_Call
func (*MockCluster_LoadSegments_Call) Run ¶
func (_c *MockCluster_LoadSegments_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest)) *MockCluster_LoadSegments_Call
func (*MockCluster_LoadSegments_Call) RunAndReturn ¶
func (_c *MockCluster_LoadSegments_Call) RunAndReturn(run func(context.Context, int64, *querypb.LoadSegmentsRequest) (*commonpb.Status, error)) *MockCluster_LoadSegments_Call
type MockCluster_ReleasePartitions_Call ¶
MockCluster_ReleasePartitions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleasePartitions'
func (*MockCluster_ReleasePartitions_Call) Return ¶
func (_c *MockCluster_ReleasePartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_ReleasePartitions_Call
func (*MockCluster_ReleasePartitions_Call) Run ¶
func (_c *MockCluster_ReleasePartitions_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest)) *MockCluster_ReleasePartitions_Call
func (*MockCluster_ReleasePartitions_Call) RunAndReturn ¶
func (_c *MockCluster_ReleasePartitions_Call) RunAndReturn(run func(context.Context, int64, *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)) *MockCluster_ReleasePartitions_Call
type MockCluster_ReleaseSegments_Call ¶
MockCluster_ReleaseSegments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReleaseSegments'
func (*MockCluster_ReleaseSegments_Call) Return ¶
func (_c *MockCluster_ReleaseSegments_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_ReleaseSegments_Call
func (*MockCluster_ReleaseSegments_Call) Run ¶
func (_c *MockCluster_ReleaseSegments_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest)) *MockCluster_ReleaseSegments_Call
func (*MockCluster_ReleaseSegments_Call) RunAndReturn ¶
func (_c *MockCluster_ReleaseSegments_Call) RunAndReturn(run func(context.Context, int64, *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)) *MockCluster_ReleaseSegments_Call
type MockCluster_Start_Call ¶
MockCluster_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockCluster_Start_Call) Return ¶
func (_c *MockCluster_Start_Call) Return() *MockCluster_Start_Call
func (*MockCluster_Start_Call) Run ¶
func (_c *MockCluster_Start_Call) Run(run func()) *MockCluster_Start_Call
func (*MockCluster_Start_Call) RunAndReturn ¶
func (_c *MockCluster_Start_Call) RunAndReturn(run func()) *MockCluster_Start_Call
type MockCluster_Stop_Call ¶
MockCluster_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
func (*MockCluster_Stop_Call) Return ¶
func (_c *MockCluster_Stop_Call) Return() *MockCluster_Stop_Call
func (*MockCluster_Stop_Call) Run ¶
func (_c *MockCluster_Stop_Call) Run(run func()) *MockCluster_Stop_Call
func (*MockCluster_Stop_Call) RunAndReturn ¶
func (_c *MockCluster_Stop_Call) RunAndReturn(run func()) *MockCluster_Stop_Call
type MockCluster_SyncDistribution_Call ¶
MockCluster_SyncDistribution_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncDistribution'
func (*MockCluster_SyncDistribution_Call) Return ¶
func (_c *MockCluster_SyncDistribution_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_SyncDistribution_Call
func (*MockCluster_SyncDistribution_Call) Run ¶
func (_c *MockCluster_SyncDistribution_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest)) *MockCluster_SyncDistribution_Call
func (*MockCluster_SyncDistribution_Call) RunAndReturn ¶
func (_c *MockCluster_SyncDistribution_Call) RunAndReturn(run func(context.Context, int64, *querypb.SyncDistributionRequest) (*commonpb.Status, error)) *MockCluster_SyncDistribution_Call
type MockCluster_UnsubDmChannel_Call ¶
MockCluster_UnsubDmChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubDmChannel'
func (*MockCluster_UnsubDmChannel_Call) Return ¶
func (_c *MockCluster_UnsubDmChannel_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_UnsubDmChannel_Call
func (*MockCluster_UnsubDmChannel_Call) Run ¶
func (_c *MockCluster_UnsubDmChannel_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest)) *MockCluster_UnsubDmChannel_Call
func (*MockCluster_UnsubDmChannel_Call) RunAndReturn ¶
func (_c *MockCluster_UnsubDmChannel_Call) RunAndReturn(run func(context.Context, int64, *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)) *MockCluster_UnsubDmChannel_Call
type MockCluster_WatchDmChannels_Call ¶
MockCluster_WatchDmChannels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchDmChannels'
func (*MockCluster_WatchDmChannels_Call) Return ¶
func (_c *MockCluster_WatchDmChannels_Call) Return(_a0 *commonpb.Status, _a1 error) *MockCluster_WatchDmChannels_Call
func (*MockCluster_WatchDmChannels_Call) Run ¶
func (_c *MockCluster_WatchDmChannels_Call) Run(run func(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest)) *MockCluster_WatchDmChannels_Call
func (*MockCluster_WatchDmChannels_Call) RunAndReturn ¶
func (_c *MockCluster_WatchDmChannels_Call) RunAndReturn(run func(context.Context, int64, *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)) *MockCluster_WatchDmChannels_Call
type NodeInfo ¶
type NodeInfo struct {
// contains filtered or unexported fields
}
func NewNodeInfo ¶
func NewNodeInfo(info ImmutableNodeInfo) *NodeInfo
func (*NodeInfo) ChannelCnt ¶
func (*NodeInfo) IsStoppingState ¶
func (*NodeInfo) LastHeartbeat ¶
func (*NodeInfo) MemCapacity ¶
return node's memory capacity in mb
func (*NodeInfo) SegmentCnt ¶
func (*NodeInfo) SetLastHeartbeat ¶
func (*NodeInfo) UpdateStats ¶
func (n *NodeInfo) UpdateStats(opts ...StatsOption)
type NodeManager ¶
type NodeManager struct {
// contains filtered or unexported fields
}
func NewNodeManager ¶
func NewNodeManager() *NodeManager
func (*NodeManager) Add ¶
func (m *NodeManager) Add(node *NodeInfo)
func (*NodeManager) Get ¶
func (m *NodeManager) Get(nodeID int64) *NodeInfo
func (*NodeManager) GetAll ¶
func (m *NodeManager) GetAll() []*NodeInfo
func (*NodeManager) IsStoppingNode ¶
func (m *NodeManager) IsStoppingNode(nodeID int64) (bool, error)
func (*NodeManager) Remove ¶
func (m *NodeManager) Remove(nodeID int64)
func (*NodeManager) Stopping ¶
func (m *NodeManager) Stopping(nodeID int64)
type QueryCluster ¶
type QueryCluster struct {
// contains filtered or unexported fields
}
QueryCluster is used to send requests to QueryNodes and manage connections
func NewCluster ¶
func NewCluster(nodeManager *NodeManager, queryNodeCreator QueryNodeCreator) *QueryCluster
func (*QueryCluster) GetComponentStates ¶
func (c *QueryCluster) GetComponentStates(ctx context.Context, nodeID int64) (*milvuspb.ComponentStates, error)
func (*QueryCluster) GetDataDistribution ¶
func (c *QueryCluster) GetDataDistribution(ctx context.Context, nodeID int64, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)
func (*QueryCluster) GetMetrics ¶
func (c *QueryCluster) GetMetrics(ctx context.Context, nodeID int64, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
func (*QueryCluster) LoadPartitions ¶
func (c *QueryCluster) LoadPartitions(ctx context.Context, nodeID int64, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)
func (*QueryCluster) LoadSegments ¶
func (c *QueryCluster) LoadSegments(ctx context.Context, nodeID int64, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
func (*QueryCluster) ReleasePartitions ¶
func (c *QueryCluster) ReleasePartitions(ctx context.Context, nodeID int64, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
func (*QueryCluster) ReleaseSegments ¶
func (c *QueryCluster) ReleaseSegments(ctx context.Context, nodeID int64, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
func (*QueryCluster) Start ¶
func (c *QueryCluster) Start()
func (*QueryCluster) Stop ¶
func (c *QueryCluster) Stop()
func (*QueryCluster) SyncDistribution ¶
func (c *QueryCluster) SyncDistribution(ctx context.Context, nodeID int64, req *querypb.SyncDistributionRequest) (*commonpb.Status, error)
func (*QueryCluster) UnsubDmChannel ¶
func (c *QueryCluster) UnsubDmChannel(ctx context.Context, nodeID int64, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)
func (*QueryCluster) WatchDmChannels ¶
func (c *QueryCluster) WatchDmChannels(ctx context.Context, nodeID int64, req *querypb.WatchDmChannelsRequest) (*commonpb.Status, error)
type QueryNodeCreator ¶
type StatsOption ¶
type StatsOption func(*NodeInfo)
func WithChannelCnt ¶
func WithChannelCnt(cnt int) StatsOption
func WithMemCapacity ¶
func WithMemCapacity(capacity float64) StatsOption
func WithSegmentCnt ¶
func WithSegmentCnt(cnt int) StatsOption