2021-12-03 15:15:32 +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
|
|
|
|
// with the License. You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
package mock
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
|
2022-09-16 16:56:49 +08:00
|
|
|
"github.com/milvus-io/milvus/api/commonpb"
|
|
|
|
"github.com/milvus-io/milvus/api/milvuspb"
|
2021-12-03 15:15:32 +08:00
|
|
|
"github.com/milvus-io/milvus/internal/proto/datapb"
|
|
|
|
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
|
|
|
)
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
var _ datapb.DataNodeClient = &GrpcDataNodeClient{}
|
|
|
|
|
|
|
|
type GrpcDataNodeClient struct {
|
2021-12-03 15:15:32 +08:00
|
|
|
Err error
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) GetComponentStates(ctx context.Context, in *internalpb.GetComponentStatesRequest, opts ...grpc.CallOption) (*internalpb.ComponentStates, error) {
|
2021-12-03 15:15:32 +08:00
|
|
|
return &internalpb.ComponentStates{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
|
2021-12-03 15:15:32 +08:00
|
|
|
return &milvuspb.StringResponse{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
2021-12-03 15:15:32 +08:00
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegmentsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
2021-12-03 15:15:32 +08:00
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-08-12 13:20:39 +08:00
|
|
|
func (m *GrpcDataNodeClient) ShowConfigurations(ctx context.Context, in *internalpb.ShowConfigurationsRequest, opts ...grpc.CallOption) (*internalpb.ShowConfigurationsResponse, error) {
|
|
|
|
return &internalpb.ShowConfigurationsResponse{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) GetMetrics(ctx context.Context, in *milvuspb.GetMetricsRequest, opts ...grpc.CallOption) (*milvuspb.GetMetricsResponse, error) {
|
2021-12-03 15:15:32 +08:00
|
|
|
return &milvuspb.GetMetricsResponse{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) Compaction(ctx context.Context, req *datapb.CompactionPlan, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
2021-12-03 15:15:32 +08:00
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
2022-03-09 18:33:59 +08:00
|
|
|
|
2022-08-23 15:50:52 +08:00
|
|
|
func (m *GrpcDataNodeClient) GetCompactionState(ctx context.Context, in *datapb.CompactionStateRequest, opts ...grpc.CallOption) (*datapb.CompactionStateResponse, error) {
|
|
|
|
return &datapb.CompactionStateResponse{}, m.Err
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) Import(ctx context.Context, req *datapb.ImportTaskRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
2022-03-09 18:33:59 +08:00
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
2022-05-25 14:34:00 +08:00
|
|
|
|
2022-05-30 17:16:08 +08:00
|
|
|
func (m *GrpcDataNodeClient) ResendSegmentStats(ctx context.Context, req *datapb.ResendSegmentStatsRequest, opts ...grpc.CallOption) (*datapb.ResendSegmentStatsResponse, error) {
|
2022-05-25 14:34:00 +08:00
|
|
|
return &datapb.ResendSegmentStatsResponse{}, m.Err
|
|
|
|
}
|
2022-06-02 18:54:04 +08:00
|
|
|
|
2022-09-26 18:06:54 +08:00
|
|
|
func (m *GrpcDataNodeClient) AddImportSegment(ctx context.Context, in *datapb.AddImportSegmentRequest, opts ...grpc.CallOption) (*datapb.AddImportSegmentResponse, error) {
|
|
|
|
return &datapb.AddImportSegmentResponse{}, m.Err
|
2022-06-02 18:54:04 +08:00
|
|
|
}
|
2022-09-23 10:22:52 +08:00
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) SyncSegments(ctx context.Context, in *datapb.SyncSegmentsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|