mirror of https://github.com/milvus-io/milvus.git
parent
2e0f7dfe42
commit
7205fd3d9b
|
@ -22,7 +22,6 @@ import (
|
|||
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/milvus-io/milvus/internal/proto/milvuspb"
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
"github.com/milvus-io/milvus/internal/util/retry"
|
||||
"github.com/milvus-io/milvus/internal/util/sessionutil"
|
||||
"github.com/milvus-io/milvus/internal/util/trace"
|
||||
|
@ -36,16 +35,6 @@ import (
|
|||
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
||||
)
|
||||
|
||||
// Base is a base class abstracted from components.
|
||||
type Base interface {
|
||||
types.DataCoord
|
||||
|
||||
Init() error
|
||||
Start() error
|
||||
Stop() error
|
||||
Register() error
|
||||
}
|
||||
|
||||
// Client is the datacoord grpc client
|
||||
type Client struct {
|
||||
ctx context.Context
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
grpc_retry "github.com/grpc-ecosystem/go-grpc-middleware/retry"
|
||||
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
"github.com/milvus-io/milvus/internal/util/retry"
|
||||
"github.com/milvus-io/milvus/internal/util/sessionutil"
|
||||
"github.com/milvus-io/milvus/internal/util/trace"
|
||||
|
@ -36,16 +35,6 @@ import (
|
|||
"github.com/milvus-io/milvus/internal/proto/milvuspb"
|
||||
)
|
||||
|
||||
// Base is a base class abstracted from components.
|
||||
type Base interface {
|
||||
types.IndexCoord
|
||||
|
||||
Init() error
|
||||
Start() error
|
||||
Stop() error
|
||||
Register() error
|
||||
}
|
||||
|
||||
// Client is the grpc client of IndexCoord.
|
||||
type Client struct {
|
||||
ctx context.Context
|
||||
|
|
|
@ -49,8 +49,8 @@ type Server struct {
|
|||
|
||||
msFactory msgstream.Factory
|
||||
|
||||
dataCoord dsc.Base
|
||||
rootCoord rcc.Base
|
||||
dataCoord types.DataCoord
|
||||
rootCoord types.RootCoord
|
||||
|
||||
closer io.Closer
|
||||
}
|
||||
|
|
|
@ -16,8 +16,6 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
dcc "github.com/milvus-io/milvus/internal/distributed/datacoord/client"
|
||||
rcc "github.com/milvus-io/milvus/internal/distributed/rootcoord/client"
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
|
||||
|
@ -129,7 +127,7 @@ func (m *MockQueryCoord) GetMetrics(ctx context.Context, req *milvuspb.GetMetric
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
type MockRootCoord struct {
|
||||
rcc.Base
|
||||
types.RootCoord
|
||||
initErr error
|
||||
startErr error
|
||||
regErr error
|
||||
|
@ -162,7 +160,7 @@ func (m *MockRootCoord) GetComponentStates(ctx context.Context) (*internalpb.Com
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
type MockDataCoord struct {
|
||||
dcc.Base
|
||||
types.DataCoord
|
||||
initErr error
|
||||
startErr error
|
||||
stopErr error
|
||||
|
|
|
@ -55,8 +55,8 @@ type Server struct {
|
|||
|
||||
grpcServer *grpc.Server
|
||||
|
||||
rootCoord rcc.Base
|
||||
indexCoord isc.Base
|
||||
rootCoord types.RootCoord
|
||||
indexCoord types.IndexCoord
|
||||
|
||||
closer io.Closer
|
||||
}
|
||||
|
|
|
@ -16,9 +16,6 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
isc "github.com/milvus-io/milvus/internal/distributed/indexcoord/client"
|
||||
rcc "github.com/milvus-io/milvus/internal/distributed/rootcoord/client"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/proto/commonpb"
|
||||
|
@ -119,7 +116,7 @@ func (m *MockQueryNode) SetIndexCoord(index types.IndexCoord) error {
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
type MockRootCoord struct {
|
||||
rcc.Base
|
||||
types.RootCoord
|
||||
initErr error
|
||||
startErr error
|
||||
regErr error
|
||||
|
@ -152,7 +149,7 @@ func (m *MockRootCoord) GetComponentStates(ctx context.Context) (*internalpb.Com
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
type MockIndexCoord struct {
|
||||
isc.Base
|
||||
types.IndexCoord
|
||||
initErr error
|
||||
startErr error
|
||||
regErr error
|
||||
|
|
|
@ -27,7 +27,6 @@ import (
|
|||
"github.com/milvus-io/milvus/internal/proto/milvuspb"
|
||||
"github.com/milvus-io/milvus/internal/proto/proxypb"
|
||||
"github.com/milvus-io/milvus/internal/proto/rootcoordpb"
|
||||
"github.com/milvus-io/milvus/internal/types"
|
||||
"github.com/milvus-io/milvus/internal/util/retry"
|
||||
"github.com/milvus-io/milvus/internal/util/sessionutil"
|
||||
"github.com/milvus-io/milvus/internal/util/trace"
|
||||
|
@ -37,16 +36,6 @@ import (
|
|||
"google.golang.org/grpc/codes"
|
||||
)
|
||||
|
||||
// Base is an interface that embeds types.RootCoord and contains some other methods.
|
||||
type Base interface {
|
||||
types.RootCoord
|
||||
|
||||
Init() error
|
||||
Start() error
|
||||
Stop() error
|
||||
Register() error
|
||||
}
|
||||
|
||||
// GrpcClient grpc client
|
||||
type GrpcClient struct {
|
||||
ctx context.Context
|
||||
|
|
Loading…
Reference in New Issue