2021-12-29 21:00:35 +08:00
|
|
|
// Licensed to the LF AI & Data foundation under one
|
|
|
|
// or more contributor license agreements. See the NOTICE file
|
|
|
|
// distributed with this work for additional information
|
|
|
|
// regarding copyright ownership. The ASF licenses this file
|
|
|
|
// to you under the Apache License, Version 2.0 (the
|
|
|
|
// "License"); you may not use this file except in compliance
|
2021-04-19 15:15:33 +08:00
|
|
|
// with the License. You may obtain a copy of the License at
|
|
|
|
//
|
2021-12-29 21:00:35 +08:00
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
2021-04-19 15:15:33 +08:00
|
|
|
//
|
2021-12-29 21:00:35 +08:00
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2021-04-19 15:15:33 +08:00
|
|
|
|
2021-03-05 15:21:33 +08:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2023-09-26 09:57:25 +08:00
|
|
|
"io"
|
2021-03-05 15:21:33 +08:00
|
|
|
|
2023-09-07 07:25:14 +08:00
|
|
|
"github.com/tikv/client-go/v2/txnkv"
|
2022-04-02 14:15:31 +08:00
|
|
|
clientv3 "go.etcd.io/etcd/client/v3"
|
|
|
|
|
2023-06-09 01:28:37 +08:00
|
|
|
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
|
|
|
|
"github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
|
2021-04-22 14:45:57 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/datapb"
|
2023-06-25 17:20:43 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/indexpb"
|
2021-04-22 14:45:57 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/proxypb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/querypb"
|
2021-06-22 16:14:09 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/rootcoordpb"
|
2021-03-05 15:21:33 +08:00
|
|
|
)
|
|
|
|
|
2022-09-16 09:56:47 +08:00
|
|
|
// Limiter defines the interface to perform request rate limiting.
|
|
|
|
// If Limit function return true, the request will be rejected.
|
|
|
|
// Otherwise, the request will pass. Limit also returns limit of limiter.
|
|
|
|
type Limiter interface {
|
2023-09-19 10:37:23 +08:00
|
|
|
Check(collectionID int64, rt internalpb.RateType, n int) error
|
2022-09-16 09:56:47 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// Component is the interface all services implement
|
2021-03-05 15:21:33 +08:00
|
|
|
type Component interface {
|
|
|
|
Init() error
|
|
|
|
Start() error
|
|
|
|
Stop() error
|
2021-05-25 15:06:05 +08:00
|
|
|
Register() error
|
2023-09-26 09:57:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// DataNodeClient is the client interface for datanode server
|
|
|
|
type DataNodeClient interface {
|
|
|
|
io.Closer
|
|
|
|
datapb.DataNodeClient
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// DataNode is the interface `datanode` package implements
|
2021-03-05 18:14:59 +08:00
|
|
|
type DataNode interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
datapb.DataNodeServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-10-09 10:10:59 +08:00
|
|
|
// DataNodeComponent is used by grpc server of DataNode
|
2023-07-14 10:12:31 +08:00
|
|
|
//
|
|
|
|
//go:generate mockery --name=DataNodeComponent --structname=MockDataNode --output=../mocks --filename=mock_datanode.go --with-expecter
|
2021-10-09 10:10:59 +08:00
|
|
|
type DataNodeComponent interface {
|
|
|
|
DataNode
|
|
|
|
|
|
|
|
// UpdateStateCode updates state code for DataNode
|
2021-10-14 14:10:34 +08:00
|
|
|
// `stateCode` is current statement of this data node, indicating whether it's healthy.
|
2022-10-10 15:55:22 +08:00
|
|
|
UpdateStateCode(stateCode commonpb.StateCode)
|
2021-10-09 10:10:59 +08:00
|
|
|
|
2021-10-14 14:10:34 +08:00
|
|
|
// GetStateCode return state code of this data node
|
2022-10-10 15:55:22 +08:00
|
|
|
GetStateCode() commonpb.StateCode
|
2021-10-09 10:10:59 +08:00
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
2023-01-12 19:49:40 +08:00
|
|
|
GetAddress() string
|
2022-11-04 14:25:38 +08:00
|
|
|
|
2021-12-29 14:35:21 +08:00
|
|
|
// SetEtcdClient set etcd client for DataNode
|
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// SetRootCoordClient set SetRootCoordClient for DataNode
|
2021-10-14 14:10:34 +08:00
|
|
|
// `rootCoord` is a client of root coordinator.
|
|
|
|
//
|
|
|
|
// Return a generic error in status:
|
|
|
|
// If the rootCoord is nil or the rootCoord has been set before.
|
|
|
|
// Return nil in status:
|
|
|
|
// The rootCoord is not nil.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetRootCoordClient(rootCoord RootCoordClient) error
|
2021-10-09 10:10:59 +08:00
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// SetDataCoordClient set DataCoord for DataNode
|
2021-10-14 14:10:34 +08:00
|
|
|
// `dataCoord` is a client of data coordinator.
|
|
|
|
//
|
|
|
|
// Return a generic error in status:
|
|
|
|
// If the dataCoord is nil or the dataCoord has been set before.
|
|
|
|
// Return nil in status:
|
|
|
|
// The dataCoord is not nil.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetDataCoordClient(dataCoord DataCoordClient) error
|
|
|
|
}
|
|
|
|
|
|
|
|
// DataCoordClient is the client interface for datacoord server
|
|
|
|
type DataCoordClient interface {
|
|
|
|
io.Closer
|
|
|
|
datapb.DataCoordClient
|
2021-10-09 10:10:59 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// DataCoord is the interface `datacoord` package implements
|
2021-06-21 18:22:13 +08:00
|
|
|
type DataCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
datapb.DataCoordServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-12-29 14:35:21 +08:00
|
|
|
// DataCoordComponent defines the interface of DataCoord component.
|
2023-07-14 10:12:31 +08:00
|
|
|
//
|
|
|
|
//go:generate mockery --name=DataCoordComponent --structname=MockDataCoord --output=../mocks --filename=mock_datacoord.go --with-expecter
|
2021-12-29 14:35:21 +08:00
|
|
|
type DataCoordComponent interface {
|
|
|
|
DataCoord
|
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
2021-12-29 14:35:21 +08:00
|
|
|
// SetEtcdClient set EtcdClient for DataCoord
|
|
|
|
// `etcdClient` is a client of etcd
|
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
2023-01-12 19:49:40 +08:00
|
|
|
|
2023-09-07 07:25:14 +08:00
|
|
|
// SetTiKVClient set TiKV client for QueryNode
|
|
|
|
SetTiKVClient(client *txnkv.Client)
|
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
SetRootCoordClient(rootCoord RootCoordClient)
|
2023-01-12 19:49:40 +08:00
|
|
|
|
|
|
|
// SetDataNodeCreator set DataNode client creator func for DataCoord
|
2023-09-26 09:57:25 +08:00
|
|
|
SetDataNodeCreator(func(context.Context, string, int64) (DataNodeClient, error))
|
2023-01-12 19:49:40 +08:00
|
|
|
|
2023-09-21 09:45:27 +08:00
|
|
|
// SetIndexNodeCreator set Index client creator func for DataCoord
|
2023-09-26 09:57:25 +08:00
|
|
|
SetIndexNodeCreator(func(context.Context, string, int64) (IndexNodeClient, error))
|
|
|
|
}
|
|
|
|
|
|
|
|
// IndexNodeClient is the client interface for indexnode server
|
|
|
|
type IndexNodeClient interface {
|
|
|
|
io.Closer
|
|
|
|
indexpb.IndexNodeClient
|
2021-12-29 14:35:21 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// IndexNode is the interface `indexnode` package implements
|
2021-03-05 18:14:59 +08:00
|
|
|
type IndexNode interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
indexpb.IndexNodeServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-12-29 14:35:21 +08:00
|
|
|
// IndexNodeComponent is used by grpc server of IndexNode
|
|
|
|
type IndexNodeComponent interface {
|
|
|
|
IndexNode
|
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
2023-01-12 19:49:40 +08:00
|
|
|
GetAddress() string
|
2022-01-10 18:51:35 +08:00
|
|
|
// SetEtcdClient set etcd client for IndexNodeComponent
|
2021-12-29 14:35:21 +08:00
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
|
|
|
|
2022-01-10 18:51:35 +08:00
|
|
|
// UpdateStateCode updates state code for IndexNodeComponent
|
2022-01-10 10:35:34 +08:00
|
|
|
// `stateCode` is current statement of this QueryCoord, indicating whether it's healthy.
|
2022-10-10 15:55:22 +08:00
|
|
|
UpdateStateCode(stateCode commonpb.StateCode)
|
2021-12-29 14:35:21 +08:00
|
|
|
}
|
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// RootCoordClient is the client interface for rootcoord server
|
|
|
|
type RootCoordClient interface {
|
|
|
|
io.Closer
|
|
|
|
rootcoordpb.RootCoordClient
|
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// RootCoord is the interface `rootcoord` package implements
|
2023-06-25 17:20:43 +08:00
|
|
|
//
|
|
|
|
//go:generate mockery --name=RootCoord --output=../mocks --filename=mock_rootcoord.go --with-expecter
|
2021-06-21 17:28:03 +08:00
|
|
|
type RootCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
rootcoordpb.RootCoordServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-06-22 19:08:03 +08:00
|
|
|
// RootCoordComponent is used by grpc server of RootCoord
|
2021-06-21 17:28:03 +08:00
|
|
|
type RootCoordComponent interface {
|
|
|
|
RootCoord
|
2021-04-24 17:23:35 +08:00
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
2021-12-29 14:35:21 +08:00
|
|
|
// SetEtcdClient set EtcdClient for RootCoord
|
|
|
|
// `etcdClient` is a client of etcd
|
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
|
|
|
|
2023-09-07 07:25:14 +08:00
|
|
|
// SetTiKVClient set TiKV client for RootCoord
|
|
|
|
SetTiKVClient(client *txnkv.Client)
|
|
|
|
|
2021-10-02 09:18:28 +08:00
|
|
|
// UpdateStateCode updates state code for RootCoord
|
|
|
|
// State includes: Initializing, Healthy and Abnormal
|
2022-10-10 15:55:22 +08:00
|
|
|
UpdateStateCode(commonpb.StateCode)
|
2021-10-02 09:22:25 +08:00
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// SetDataCoordClient set SetDataCoordClient for RootCoord
|
2021-10-14 14:10:34 +08:00
|
|
|
// `dataCoord` is a client of data coordinator.
|
|
|
|
//
|
|
|
|
// Always return nil.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetDataCoordClient(dataCoord DataCoordClient) error
|
2021-10-02 09:26:24 +08:00
|
|
|
|
2021-10-02 09:30:27 +08:00
|
|
|
// SetQueryCoord set QueryCoord for RootCoord
|
2021-10-14 14:10:34 +08:00
|
|
|
// `queryCoord` is a client of query coordinator.
|
|
|
|
//
|
|
|
|
// Always return nil.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetQueryCoordClient(queryCoord QueryCoordClient) error
|
2021-10-02 09:34:27 +08:00
|
|
|
|
2023-01-12 19:49:40 +08:00
|
|
|
// SetProxyCreator set Proxy client creator func for RootCoord
|
2023-09-26 09:57:25 +08:00
|
|
|
SetProxyCreator(func(ctx context.Context, addr string, nodeID int64) (ProxyClient, error))
|
2023-01-12 19:49:40 +08:00
|
|
|
|
2021-10-02 09:14:14 +08:00
|
|
|
// GetMetrics notifies RootCoordComponent to collect metrics for specified component
|
2021-08-31 11:45:59 +08:00
|
|
|
GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
|
2021-04-24 17:23:35 +08:00
|
|
|
}
|
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// ProxyClient is the client interface for proxy server
|
|
|
|
type ProxyClient interface {
|
|
|
|
io.Closer
|
|
|
|
proxypb.ProxyClient
|
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// Proxy is the interface `proxy` package implements
|
2021-06-22 19:08:03 +08:00
|
|
|
type Proxy interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
proxypb.ProxyServer
|
|
|
|
milvuspb.MilvusServiceServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-10-28 20:19:20 +08:00
|
|
|
// ProxyComponent defines the interface of proxy component.
|
2023-07-14 10:12:31 +08:00
|
|
|
//
|
|
|
|
//go:generate mockery --name=ProxyComponent --structname=MockProxy --output=../mocks --filename=mock_proxy.go --with-expecter
|
2021-10-14 17:48:34 +08:00
|
|
|
type ProxyComponent interface {
|
|
|
|
Proxy
|
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
2023-01-12 19:49:40 +08:00
|
|
|
GetAddress() string
|
2021-12-29 14:35:21 +08:00
|
|
|
// SetEtcdClient set EtcdClient for Proxy
|
|
|
|
// `etcdClient` is a client of etcd
|
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
|
|
|
|
2023-09-21 09:45:27 +08:00
|
|
|
// SetRootCoordClient set RootCoord for Proxy
|
2021-10-14 17:48:34 +08:00
|
|
|
// `rootCoord` is a client of root coordinator.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetRootCoordClient(rootCoord RootCoordClient)
|
2021-10-14 17:48:34 +08:00
|
|
|
|
2022-01-06 13:36:16 +08:00
|
|
|
// SetDataCoordClient set DataCoord for Proxy
|
2021-10-14 17:48:34 +08:00
|
|
|
// `dataCoord` is a client of data coordinator.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetDataCoordClient(dataCoord DataCoordClient)
|
2021-10-14 17:48:34 +08:00
|
|
|
|
2022-01-06 10:39:21 +08:00
|
|
|
// SetIndexCoordClient set IndexCoord for Proxy
|
2021-10-14 17:48:34 +08:00
|
|
|
// `indexCoord` is a client of index coordinator.
|
2023-09-21 09:45:27 +08:00
|
|
|
// SetIndexCoordClient(indexCoord IndexCoord)
|
2021-10-14 17:48:34 +08:00
|
|
|
|
2022-01-07 21:05:49 +08:00
|
|
|
// SetQueryCoordClient set QueryCoord for Proxy
|
2021-10-14 17:48:34 +08:00
|
|
|
// `queryCoord` is a client of query coordinator.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetQueryCoordClient(queryCoord QueryCoordClient)
|
2021-10-14 17:48:34 +08:00
|
|
|
|
2023-01-12 19:49:40 +08:00
|
|
|
// SetQueryNodeCreator set QueryNode client creator func for Proxy
|
2023-09-26 09:57:25 +08:00
|
|
|
SetQueryNodeCreator(func(ctx context.Context, addr string, nodeID int64) (QueryNodeClient, error))
|
2023-01-12 19:49:40 +08:00
|
|
|
|
2022-09-16 09:56:47 +08:00
|
|
|
// GetRateLimiter returns the rateLimiter in Proxy
|
|
|
|
GetRateLimiter() (Limiter, error)
|
|
|
|
|
2021-10-14 17:48:34 +08:00
|
|
|
// UpdateStateCode updates state code for Proxy
|
|
|
|
// `stateCode` is current statement of this proxy node, indicating whether it's healthy.
|
2022-10-10 15:55:22 +08:00
|
|
|
UpdateStateCode(stateCode commonpb.StateCode)
|
2023-09-26 09:57:25 +08:00
|
|
|
}
|
2021-10-14 17:48:34 +08:00
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
type QueryNodeClient interface {
|
|
|
|
io.Closer
|
|
|
|
querypb.QueryNodeClient
|
2021-10-14 17:48:34 +08:00
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// QueryNode is the interface `querynode` package implements
|
2021-03-05 18:14:59 +08:00
|
|
|
type QueryNode interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
querypb.QueryNodeServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
|
|
|
|
2021-10-11 17:16:30 +08:00
|
|
|
// QueryNodeComponent is used by grpc server of QueryNode
|
2023-07-14 10:12:31 +08:00
|
|
|
//
|
|
|
|
//go:generate mockery --name=QueryNodeComponent --structname=MockQueryNode --output=../mocks --filename=mock_querynode.go --with-expecter
|
2021-10-11 17:16:30 +08:00
|
|
|
type QueryNodeComponent interface {
|
|
|
|
QueryNode
|
|
|
|
|
|
|
|
// UpdateStateCode updates state code for QueryNode
|
|
|
|
// `stateCode` is current statement of this query node, indicating whether it's healthy.
|
2022-10-10 15:55:22 +08:00
|
|
|
UpdateStateCode(stateCode commonpb.StateCode)
|
2021-10-11 17:16:30 +08:00
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
2023-01-12 19:49:40 +08:00
|
|
|
GetAddress() string
|
2022-11-04 14:25:38 +08:00
|
|
|
|
2021-12-29 14:35:21 +08:00
|
|
|
// SetEtcdClient set etcd client for QueryNode
|
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
2021-10-11 17:16:30 +08:00
|
|
|
}
|
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// QueryCoordClient is the client interface for querycoord server
|
|
|
|
type QueryCoordClient interface {
|
|
|
|
io.Closer
|
|
|
|
querypb.QueryCoordClient
|
|
|
|
}
|
|
|
|
|
2021-09-28 22:06:06 +08:00
|
|
|
// QueryCoord is the interface `querycoord` package implements
|
2021-06-22 16:44:09 +08:00
|
|
|
type QueryCoord interface {
|
2021-03-05 15:21:33 +08:00
|
|
|
Component
|
2023-09-26 09:57:25 +08:00
|
|
|
querypb.QueryCoordServer
|
2021-03-05 15:21:33 +08:00
|
|
|
}
|
2021-10-11 10:02:25 +08:00
|
|
|
|
|
|
|
// QueryCoordComponent is used by grpc server of QueryCoord
|
2023-07-14 10:12:31 +08:00
|
|
|
//
|
|
|
|
//go:generate mockery --name=QueryCoordComponent --structname=MockQueryCoord --output=../mocks --filename=mock_querycoord.go --with-expecter
|
2021-10-11 10:02:25 +08:00
|
|
|
type QueryCoordComponent interface {
|
|
|
|
QueryCoord
|
2021-12-29 14:35:21 +08:00
|
|
|
|
2022-11-04 14:25:38 +08:00
|
|
|
SetAddress(address string)
|
|
|
|
|
2021-12-29 14:35:21 +08:00
|
|
|
// SetEtcdClient set etcd client for QueryCoord
|
|
|
|
SetEtcdClient(etcdClient *clientv3.Client)
|
2021-10-11 10:02:25 +08:00
|
|
|
|
2023-09-07 07:25:14 +08:00
|
|
|
// SetTiKVClient set TiKV client for QueryCoord
|
|
|
|
SetTiKVClient(client *txnkv.Client)
|
|
|
|
|
2021-10-11 10:02:25 +08:00
|
|
|
// UpdateStateCode updates state code for QueryCoord
|
2022-01-10 10:31:38 +08:00
|
|
|
// `stateCode` is current statement of this QueryCoord, indicating whether it's healthy.
|
2022-10-10 15:55:22 +08:00
|
|
|
UpdateStateCode(stateCode commonpb.StateCode)
|
2021-10-11 10:02:25 +08:00
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// SetDataCoordClient set SetDataCoordClient for QueryCoord
|
2021-10-11 19:00:46 +08:00
|
|
|
// `dataCoord` is a client of data coordinator.
|
|
|
|
//
|
|
|
|
// Return a generic error in status:
|
|
|
|
// If the dataCoord is nil.
|
|
|
|
// Return nil in status:
|
|
|
|
// The dataCoord is not nil.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetDataCoordClient(dataCoord DataCoordClient) error
|
2021-10-11 10:02:25 +08:00
|
|
|
|
2023-09-26 09:57:25 +08:00
|
|
|
// SetRootCoordClient set SetRootCoordClient for QueryCoord
|
2021-10-11 19:00:46 +08:00
|
|
|
// `rootCoord` is a client of root coordinator.
|
|
|
|
//
|
|
|
|
// Return a generic error in status:
|
|
|
|
// If the rootCoord is nil.
|
|
|
|
// Return nil in status:
|
|
|
|
// The rootCoord is not nil.
|
2023-09-26 09:57:25 +08:00
|
|
|
SetRootCoordClient(rootCoord RootCoordClient) error
|
2023-01-12 19:49:40 +08:00
|
|
|
|
|
|
|
// SetQueryNodeCreator set QueryNode client creator func for QueryCoord
|
2023-09-26 09:57:25 +08:00
|
|
|
SetQueryNodeCreator(func(ctx context.Context, addr string, nodeID int64) (QueryNodeClient, error))
|
2021-10-11 10:02:25 +08:00
|
|
|
}
|