grpc_datanode_client.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // Licensed to the LF AI & Data foundation under one
  2. // or more contributor license agreements. See the NOTICE file
  3. // distributed with this work for additional information
  4. // regarding copyright ownership. The ASF licenses this file
  5. // to you under the Apache License, Version 2.0 (the
  6. // "License"); you may not use this file except in compliance
  7. // with the License. You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. package mock
  17. import (
  18. "context"
  19. "google.golang.org/grpc"
  20. "github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
  21. "github.com/milvus-io/milvus-proto/go-api/v2/milvuspb"
  22. "github.com/milvus-io/milvus/internal/proto/datapb"
  23. "github.com/milvus-io/milvus/internal/proto/internalpb"
  24. )
  25. var _ datapb.DataNodeClient = &GrpcDataNodeClient{}
  26. type GrpcDataNodeClient struct {
  27. Err error
  28. }
  29. func (m *GrpcDataNodeClient) GetComponentStates(ctx context.Context, in *milvuspb.GetComponentStatesRequest, opts ...grpc.CallOption) (*milvuspb.ComponentStates, error) {
  30. return &milvuspb.ComponentStates{}, m.Err
  31. }
  32. func (m *GrpcDataNodeClient) GetStatisticsChannel(ctx context.Context, in *internalpb.GetStatisticsChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error) {
  33. return &milvuspb.StringResponse{}, m.Err
  34. }
  35. func (m *GrpcDataNodeClient) WatchDmChannels(ctx context.Context, in *datapb.WatchDmChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  36. return &commonpb.Status{}, m.Err
  37. }
  38. func (m *GrpcDataNodeClient) FlushSegments(ctx context.Context, in *datapb.FlushSegmentsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  39. return &commonpb.Status{}, m.Err
  40. }
  41. func (m *GrpcDataNodeClient) ShowConfigurations(ctx context.Context, in *internalpb.ShowConfigurationsRequest, opts ...grpc.CallOption) (*internalpb.ShowConfigurationsResponse, error) {
  42. return &internalpb.ShowConfigurationsResponse{}, m.Err
  43. }
  44. func (m *GrpcDataNodeClient) GetMetrics(ctx context.Context, in *milvuspb.GetMetricsRequest, opts ...grpc.CallOption) (*milvuspb.GetMetricsResponse, error) {
  45. return &milvuspb.GetMetricsResponse{}, m.Err
  46. }
  47. func (m *GrpcDataNodeClient) CompactionV2(ctx context.Context, req *datapb.CompactionPlan, opts ...grpc.CallOption) (*commonpb.Status, error) {
  48. return &commonpb.Status{}, m.Err
  49. }
  50. func (m *GrpcDataNodeClient) GetCompactionState(ctx context.Context, in *datapb.CompactionStateRequest, opts ...grpc.CallOption) (*datapb.CompactionStateResponse, error) {
  51. return &datapb.CompactionStateResponse{}, m.Err
  52. }
  53. func (m *GrpcDataNodeClient) ResendSegmentStats(ctx context.Context, req *datapb.ResendSegmentStatsRequest, opts ...grpc.CallOption) (*datapb.ResendSegmentStatsResponse, error) {
  54. return &datapb.ResendSegmentStatsResponse{}, m.Err
  55. }
  56. func (m *GrpcDataNodeClient) SyncSegments(ctx context.Context, in *datapb.SyncSegmentsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  57. return &commonpb.Status{}, m.Err
  58. }
  59. func (m *GrpcDataNodeClient) FlushChannels(ctx context.Context, in *datapb.FlushChannelsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  60. return &commonpb.Status{}, m.Err
  61. }
  62. func (m *GrpcDataNodeClient) NotifyChannelOperation(ctx context.Context, in *datapb.ChannelOperationsRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  63. return &commonpb.Status{}, m.Err
  64. }
  65. func (m *GrpcDataNodeClient) CheckChannelOperationProgress(ctx context.Context, req *datapb.ChannelWatchInfo, opts ...grpc.CallOption) (*datapb.ChannelOperationProgressResponse, error) {
  66. return &datapb.ChannelOperationProgressResponse{}, m.Err
  67. }
  68. func (m *GrpcDataNodeClient) PreImport(ctx context.Context, req *datapb.PreImportRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  69. return &commonpb.Status{}, m.Err
  70. }
  71. func (m *GrpcDataNodeClient) ImportV2(ctx context.Context, req *datapb.ImportRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  72. return &commonpb.Status{}, m.Err
  73. }
  74. func (m *GrpcDataNodeClient) QueryPreImport(ctx context.Context, req *datapb.QueryPreImportRequest, opts ...grpc.CallOption) (*datapb.QueryPreImportResponse, error) {
  75. return &datapb.QueryPreImportResponse{}, m.Err
  76. }
  77. func (m *GrpcDataNodeClient) QueryImport(ctx context.Context, req *datapb.QueryImportRequest, opts ...grpc.CallOption) (*datapb.QueryImportResponse, error) {
  78. return &datapb.QueryImportResponse{}, m.Err
  79. }
  80. func (m *GrpcDataNodeClient) DropImport(ctx context.Context, req *datapb.DropImportRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  81. return &commonpb.Status{}, m.Err
  82. }
  83. func (m *GrpcDataNodeClient) QuerySlot(ctx context.Context, req *datapb.QuerySlotRequest, opts ...grpc.CallOption) (*datapb.QuerySlotResponse, error) {
  84. return &datapb.QuerySlotResponse{}, m.Err
  85. }
  86. func (m *GrpcDataNodeClient) DropCompactionPlan(ctx context.Context, req *datapb.DropCompactionPlanRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
  87. return &commonpb.Status{}, m.Err
  88. }