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"
|
|
|
|
|
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-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-10-10 15:55:22 +08:00
|
|
|
func (m *GrpcDataNodeClient) GetComponentStates(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) {
|
|
|
|
return &milvuspb.ComponentStates{}, m.Err
|
2021-12-03 15:15:32 +08:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2024-06-16 22:07:57 +08:00
|
|
|
func (m *GrpcDataNodeClient) CompactionV2(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) 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-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
|
|
|
|
}
|
2023-09-12 21:07:19 +08:00
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) FlushChannels(ctx context.Context, in *datapb.FlushChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
2023-09-25 14:05:27 +08:00
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) NotifyChannelOperation(ctx context.Context, in *datapb.ChannelOperationsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) CheckChannelOperationProgress(ctx context.Context, req *datapb.ChannelWatchInfo, opts ...grpc.CallOption) (*datapb.ChannelOperationProgressResponse, error) {
|
|
|
|
return &datapb.ChannelOperationProgressResponse{}, m.Err
|
|
|
|
}
|
2023-12-04 19:56:35 +08:00
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) PreImport(ctx context.Context, req *datapb.PreImportRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) ImportV2(ctx context.Context, req *datapb.ImportRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) QueryPreImport(ctx context.Context, req *datapb.QueryPreImportRequest, opts ...grpc.CallOption) (*datapb.QueryPreImportResponse, error) {
|
|
|
|
return &datapb.QueryPreImportResponse{}, m.Err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) QueryImport(ctx context.Context, req *datapb.QueryImportRequest, opts ...grpc.CallOption) (*datapb.QueryImportResponse, error) {
|
|
|
|
return &datapb.QueryImportResponse{}, m.Err
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) DropImport(ctx context.Context, req *datapb.DropImportRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|
2024-05-17 18:19:38 +08:00
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) QuerySlot(ctx context.Context, req *datapb.QuerySlotRequest, opts ...grpc.CallOption) (*datapb.QuerySlotResponse, error) {
|
|
|
|
return &datapb.QuerySlotResponse{}, m.Err
|
|
|
|
}
|
2024-06-05 20:27:51 +08:00
|
|
|
|
|
|
|
func (m *GrpcDataNodeClient) DropCompactionPlan(ctx context.Context, req *datapb.DropCompactionPlanRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
|
|
|
|
return &commonpb.Status{}, m.Err
|
|
|
|
}
|