From 6e69ffd4964392b169d682e78b8e632eccd64845 Mon Sep 17 00:00:00 2001 From: Jiquan Long Date: Tue, 23 May 2023 09:45:26 +0800 Subject: [PATCH] Support to manage connections (#24224) (#24293) Signed-off-by: longjiquan --- go.mod | 2 +- go.sum | 2 + internal/core/src/pb/common.pb.cc | 1790 +++++++++++++++-- internal/core/src/pb/common.pb.h | 1067 +++++++++- internal/core/src/pb/schema.pb.cc | 85 +- internal/core/src/pb/schema.pb.h | 21 + internal/distributed/proxy/client/client.go | 18 + internal/distributed/proxy/service.go | 9 + internal/distributed/proxy/service_test.go | 8 + internal/mocks/mock_proxy.go | 1339 +++++------- internal/proto/proxy.proto | 11 + internal/proto/proxypb/proxy.pb.go | 214 +- internal/proxy/client_info.go | 49 + internal/proxy/connection_manager.go | 178 ++ internal/proxy/connection_manager_test.go | 68 + internal/proxy/impl.go | 46 + internal/proxy/impl_test.go | 73 + internal/proxy/interface_def.go | 1 + internal/proxy/keep_active_interceptor.go | 42 + .../proxy/keep_active_interceptor_test.go | 65 + internal/proxy/mock_tso_test.go | 85 + internal/proxy/proxy.go | 2 + internal/types/types.go | 4 + internal/util/constant.go | 2 + internal/util/mock/grpc_proxy_client.go | 4 + 25 files changed, 4093 insertions(+), 1092 deletions(-) create mode 100644 internal/proxy/client_info.go create mode 100644 internal/proxy/connection_manager.go create mode 100644 internal/proxy/connection_manager_test.go create mode 100644 internal/proxy/keep_active_interceptor.go create mode 100644 internal/proxy/keep_active_interceptor_test.go create mode 100644 internal/proxy/mock_tso_test.go diff --git a/go.mod b/go.mod index 4a569ae92b..6f10e109e0 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/klauspost/compress v1.14.2 github.com/lingdor/stackerror v0.0.0-20191119040541-976d8885ed76 github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d - github.com/milvus-io/milvus-proto/go-api v0.0.0-20230511113116-d65d4d30bff4 + github.com/milvus-io/milvus-proto/go-api v0.0.0-20230518083718-af486bf54d60 github.com/minio/minio-go/v7 v7.0.17 github.com/opentracing/opentracing-go v1.2.0 github.com/panjf2000/ants/v2 v2.4.8 diff --git a/go.sum b/go.sum index 2aca75e7f7..1e4a169061 100644 --- a/go.sum +++ b/go.sum @@ -508,6 +508,8 @@ github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZz github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4= github.com/milvus-io/milvus-proto/go-api v0.0.0-20230511113116-d65d4d30bff4 h1:4POQn9n+vlawERWVnXQLXyQ7mT5Pz00gON9aqAgFq3w= github.com/milvus-io/milvus-proto/go-api v0.0.0-20230511113116-d65d4d30bff4/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk= +github.com/milvus-io/milvus-proto/go-api v0.0.0-20230518083718-af486bf54d60 h1:mV9vNiZvJGm9YXzDUivFlwgbAA5N1wcO9XXwem0QS+Y= +github.com/milvus-io/milvus-proto/go-api v0.0.0-20230518083718-af486bf54d60/go.mod h1:148qnlmZ0Fdm1Fq+Mj/OW2uDoEP25g3mjh0vMGtkgmk= github.com/milvus-io/pulsar-client-go v0.6.8 h1:fZdZH73aPRszu2fazyeeahQEz34tyn1Pt9EkqJmV100= github.com/milvus-io/pulsar-client-go v0.6.8/go.mod h1:oFIlYIk23tamkSLttw849qphmMIpHY8ztEBWDWJW+sc= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= diff --git a/internal/core/src/pb/common.pb.cc b/internal/core/src/pb/common.pb.cc index efc357b77c..54782fb96e 100644 --- a/internal/core/src/pb/common.pb.cc +++ b/internal/core/src/pb/common.pb.cc @@ -15,9 +15,11 @@ #include // @@protoc_insertion_point(includes) #include +extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ClientInfo_ReservedEntry_DoNotUse_common_2eproto; extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MsgBase_common_2eproto; extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PlaceholderValue_common_2eproto; extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PrivilegeExt_common_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_common_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ServerInfo_ReservedEntry_DoNotUse_common_2eproto; namespace milvus { namespace proto { namespace common { @@ -65,6 +67,22 @@ class PrivilegeExtDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _PrivilegeExt_default_instance_; +class ClientInfo_ReservedEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ClientInfo_ReservedEntry_DoNotUse_default_instance_; +class ClientInfoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ClientInfo_default_instance_; +class ServerInfo_ReservedEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ServerInfo_ReservedEntry_DoNotUse_default_instance_; +class ServerInfoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _ServerInfo_default_instance_; } // namespace common } // namespace proto } // namespace milvus @@ -96,6 +114,34 @@ static void InitDefaultsscc_info_Blob_common_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Blob_common_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Blob_common_2eproto}, {}}; +static void InitDefaultsscc_info_ClientInfo_common_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::proto::common::_ClientInfo_default_instance_; + new (ptr) ::milvus::proto::common::ClientInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::proto::common::ClientInfo::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ClientInfo_common_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ClientInfo_common_2eproto}, { + &scc_info_ClientInfo_ReservedEntry_DoNotUse_common_2eproto.base,}}; + +static void InitDefaultsscc_info_ClientInfo_ReservedEntry_DoNotUse_common_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::proto::common::_ClientInfo_ReservedEntry_DoNotUse_default_instance_; + new (ptr) ::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse(); + } + ::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ClientInfo_ReservedEntry_DoNotUse_common_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ClientInfo_ReservedEntry_DoNotUse_common_2eproto}, {}}; + static void InitDefaultsscc_info_DMLMsgHeader_common_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -211,6 +257,34 @@ static void InitDefaultsscc_info_PrivilegeExt_common_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PrivilegeExt_common_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_PrivilegeExt_common_2eproto}, {}}; +static void InitDefaultsscc_info_ServerInfo_common_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::proto::common::_ServerInfo_default_instance_; + new (ptr) ::milvus::proto::common::ServerInfo(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::milvus::proto::common::ServerInfo::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ServerInfo_common_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ServerInfo_common_2eproto}, { + &scc_info_ServerInfo_ReservedEntry_DoNotUse_common_2eproto.base,}}; + +static void InitDefaultsscc_info_ServerInfo_ReservedEntry_DoNotUse_common_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::milvus::proto::common::_ServerInfo_ReservedEntry_DoNotUse_default_instance_; + new (ptr) ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse(); + } + ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ServerInfo_ReservedEntry_DoNotUse_common_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ServerInfo_ReservedEntry_DoNotUse_common_2eproto}, {}}; + static void InitDefaultsscc_info_Status_common_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -225,7 +299,7 @@ static void InitDefaultsscc_info_Status_common_2eproto() { ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Status_common_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Status_common_2eproto}, {}}; -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_common_2eproto[11]; +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_common_2eproto[15]; static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_common_2eproto[13]; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_common_2eproto = nullptr; @@ -310,6 +384,46 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_common_2eproto::offsets[] PROT PROTOBUF_FIELD_OFFSET(::milvus::proto::common::PrivilegeExt, object_privilege_), PROTOBUF_FIELD_OFFSET(::milvus::proto::common::PrivilegeExt, object_name_index_), PROTOBUF_FIELD_OFFSET(::milvus::proto::common::PrivilegeExt, object_name_indexs_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, sdk_type_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, sdk_version_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, local_time_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, user_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, host_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ClientInfo, reserved_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, build_tags_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, build_time_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, git_commit_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, go_version_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, deploy_mode_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::common::ServerInfo, reserved_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::milvus::proto::common::Status)}, @@ -323,6 +437,10 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 58, -1, sizeof(::milvus::proto::common::MsgHeader)}, { 64, -1, sizeof(::milvus::proto::common::DMLMsgHeader)}, { 71, -1, sizeof(::milvus::proto::common::PrivilegeExt)}, + { 80, 87, sizeof(::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse)}, + { 89, -1, sizeof(::milvus::proto::common::ClientInfo)}, + { 100, 107, sizeof(::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse)}, + { 109, -1, sizeof(::milvus::proto::common::ServerInfo)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -337,6 +455,10 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = reinterpret_cast(&::milvus::proto::common::_MsgHeader_default_instance_), reinterpret_cast(&::milvus::proto::common::_DMLMsgHeader_default_instance_), reinterpret_cast(&::milvus::proto::common::_PrivilegeExt_default_instance_), + reinterpret_cast(&::milvus::proto::common::_ClientInfo_ReservedEntry_DoNotUse_default_instance_), + reinterpret_cast(&::milvus::proto::common::_ClientInfo_default_instance_), + reinterpret_cast(&::milvus::proto::common::_ServerInfo_ReservedEntry_DoNotUse_default_instance_), + reinterpret_cast(&::milvus::proto::common::_ServerInfo_default_instance_), }; const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -363,148 +485,162 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE( ".ObjectType\022>\n\020object_privilege\030\002 \001(\0162$." "milvus.proto.common.ObjectPrivilege\022\031\n\021o" "bject_name_index\030\003 \001(\005\022\032\n\022object_name_in" - "dexs\030\004 \001(\005*\327\n\n\tErrorCode\022\013\n\007Success\020\000\022\023\n" - "\017UnexpectedError\020\001\022\021\n\rConnectFailed\020\002\022\024\n" - "\020PermissionDenied\020\003\022\027\n\023CollectionNotExis" - "ts\020\004\022\023\n\017IllegalArgument\020\005\022\024\n\020IllegalDime" - "nsion\020\007\022\024\n\020IllegalIndexType\020\010\022\031\n\025Illegal" - "CollectionName\020\t\022\017\n\013IllegalTOPK\020\n\022\024\n\020Ill" - "egalRowRecord\020\013\022\023\n\017IllegalVectorID\020\014\022\027\n\023" - "IllegalSearchResult\020\r\022\020\n\014FileNotFound\020\016\022" - "\016\n\nMetaFailed\020\017\022\017\n\013CacheFailed\020\020\022\026\n\022Cann" - "otCreateFolder\020\021\022\024\n\020CannotCreateFile\020\022\022\026" - "\n\022CannotDeleteFolder\020\023\022\024\n\020CannotDeleteFi" - "le\020\024\022\023\n\017BuildIndexError\020\025\022\020\n\014IllegalNLIS" - "T\020\026\022\025\n\021IllegalMetricType\020\027\022\017\n\013OutOfMemor" - "y\020\030\022\021\n\rIndexNotExist\020\031\022\023\n\017EmptyCollectio" - "n\020\032\022\033\n\027UpdateImportTaskFailure\020\033\022\032\n\026Coll" - "ectionNameNotFound\020\034\022\033\n\027CreateCredential" - "Failure\020\035\022\033\n\027UpdateCredentialFailure\020\036\022\033" - "\n\027DeleteCredentialFailure\020\037\022\030\n\024GetCreden" - "tialFailure\020 \022\030\n\024ListCredUsersFailure\020!\022" - "\022\n\016GetUserFailure\020\"\022\025\n\021CreateRoleFailure" - "\020#\022\023\n\017DropRoleFailure\020$\022\032\n\026OperateUserRo" - "leFailure\020%\022\025\n\021SelectRoleFailure\020&\022\025\n\021Se" - "lectUserFailure\020\'\022\031\n\025SelectResourceFailu" - "re\020(\022\033\n\027OperatePrivilegeFailure\020)\022\026\n\022Sel" - "ectGrantFailure\020*\022!\n\035RefreshPolicyInfoCa" - "cheFailure\020+\022\025\n\021ListPolicyFailure\020,\022\022\n\016N" - "otShardLeader\020-\022\026\n\022NoReplicaAvailable\020.\022" - "\023\n\017SegmentNotFound\020/\022\r\n\tForceDeny\0200\022\r\n\tR" - "ateLimit\0201\022\022\n\016NodeIDNotMatch\0202\022\024\n\020Upsert" - "AutoIDTrue\0203\022\034\n\030InsufficientMemoryToLoad" - "\0204\022\030\n\024MemoryQuotaExhausted\0205\022\026\n\022DiskQuot" - "aExhausted\0206\022\025\n\021TimeTickLongDelay\0207\022\021\n\rN" - "otReadyServe\0208\022\033\n\027NotReadyCoordActivatin" - "g\0209\022\022\n\016NotFoundTSafer\020:\022\017\n\013DataCoordNA\020d" - "\022\022\n\rDDRequestRace\020\350\007*c\n\nIndexState\022\022\n\016In" - "dexStateNone\020\000\022\014\n\010Unissued\020\001\022\016\n\nInProgre" - "ss\020\002\022\014\n\010Finished\020\003\022\n\n\006Failed\020\004\022\t\n\005Retry\020" - "\005*\202\001\n\014SegmentState\022\024\n\020SegmentStateNone\020\000" - "\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022\n\n\006Sealed\020\003\022" - "\013\n\007Flushed\020\004\022\014\n\010Flushing\020\005\022\013\n\007Dropped\020\006\022" - "\r\n\tImporting\020\007*>\n\017PlaceholderType\022\010\n\004Non" - "e\020\000\022\020\n\014BinaryVector\020d\022\017\n\013FloatVector\020e*\357" - "\016\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n\020CreateColle" - "ction\020d\022\022\n\016DropCollection\020e\022\021\n\rHasCollec" - "tion\020f\022\026\n\022DescribeCollection\020g\022\023\n\017ShowCo" - "llections\020h\022\024\n\020GetSystemConfigs\020i\022\022\n\016Loa" - "dCollection\020j\022\025\n\021ReleaseCollection\020k\022\017\n\013" - "CreateAlias\020l\022\r\n\tDropAlias\020m\022\016\n\nAlterAli" - "as\020n\022\023\n\017AlterCollection\020o\022\024\n\020RenameColle" - "ction\020p\022\024\n\017CreatePartition\020\310\001\022\022\n\rDropPar" - "tition\020\311\001\022\021\n\014HasPartition\020\312\001\022\026\n\021Describe" - "Partition\020\313\001\022\023\n\016ShowPartitions\020\314\001\022\023\n\016Loa" - "dPartitions\020\315\001\022\026\n\021ReleasePartitions\020\316\001\022\021" - "\n\014ShowSegments\020\372\001\022\024\n\017DescribeSegment\020\373\001\022" - "\021\n\014LoadSegments\020\374\001\022\024\n\017ReleaseSegments\020\375\001" - "\022\024\n\017HandoffSegments\020\376\001\022\030\n\023LoadBalanceSeg" - "ments\020\377\001\022\025\n\020DescribeSegments\020\200\002\022\020\n\013Creat" - "eIndex\020\254\002\022\022\n\rDescribeIndex\020\255\002\022\016\n\tDropInd" - "ex\020\256\002\022\013\n\006Insert\020\220\003\022\013\n\006Delete\020\221\003\022\n\n\005Flush" - "\020\222\003\022\027\n\022ResendSegmentStats\020\223\003\022\013\n\006Search\020\364" - "\003\022\021\n\014SearchResult\020\365\003\022\022\n\rGetIndexState\020\366\003" - "\022\032\n\025GetIndexBuildProgress\020\367\003\022\034\n\027GetColle" - "ctionStatistics\020\370\003\022\033\n\026GetPartitionStatis" - "tics\020\371\003\022\r\n\010Retrieve\020\372\003\022\023\n\016RetrieveResult" - "\020\373\003\022\024\n\017WatchDmChannels\020\374\003\022\025\n\020RemoveDmCha" - "nnels\020\375\003\022\027\n\022WatchQueryChannels\020\376\003\022\030\n\023Rem" - "oveQueryChannels\020\377\003\022\035\n\030SealedSegmentsCha" - "ngeInfo\020\200\004\022\027\n\022WatchDeltaChannels\020\201\004\022\024\n\017G" - "etShardLeaders\020\202\004\022\020\n\013GetReplicas\020\203\004\022\023\n\016U" - "nsubDmChannel\020\204\004\022\024\n\017GetDistribution\020\205\004\022\025" - "\n\020SyncDistribution\020\206\004\022\020\n\013SegmentInfo\020\330\004\022" - "\017\n\nSystemInfo\020\331\004\022\024\n\017GetRecoveryInfo\020\332\004\022\024" - "\n\017GetSegmentState\020\333\004\022\r\n\010TimeTick\020\260\t\022\023\n\016Q" - "ueryNodeStats\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tRequ" - "estID\020\263\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017AllocateSeg" - "ment\020\265\t\022\026\n\021SegmentStatistics\020\266\t\022\025\n\020Segme" - "ntFlushDone\020\267\t\022\017\n\nDataNodeTt\020\270\t\022\025\n\020Creat" - "eCredential\020\334\013\022\022\n\rGetCredential\020\335\013\022\025\n\020De" - "leteCredential\020\336\013\022\025\n\020UpdateCredential\020\337\013" - "\022\026\n\021ListCredUsernames\020\340\013\022\017\n\nCreateRole\020\300" - "\014\022\r\n\010DropRole\020\301\014\022\024\n\017OperateUserRole\020\302\014\022\017" - "\n\nSelectRole\020\303\014\022\017\n\nSelectUser\020\304\014\022\023\n\016Sele" - "ctResource\020\305\014\022\025\n\020OperatePrivilege\020\306\014\022\020\n\013" - "SelectGrant\020\307\014\022\033\n\026RefreshPolicyInfoCache" - "\020\310\014\022\017\n\nListPolicy\020\311\014\022\030\n\023CreateResourceGr" - "oup\020\244\r\022\026\n\021DropResourceGroup\020\245\r\022\027\n\022ListRe" - "sourceGroups\020\246\r\022\032\n\025DescribeResourceGroup" - "\020\247\r\022\021\n\014TransferNode\020\250\r\022\024\n\017TransferReplic" - "a\020\251\r\022\023\n\016CreateDatabase\020\211\016\022\021\n\014DropDatabas" - "e\020\212\016\022\022\n\rListDatabases\020\213\016*\"\n\007DslType\022\007\n\003D" - "sl\020\000\022\016\n\nBoolExprV1\020\001*B\n\017CompactionState\022" - "\021\n\rUndefiedState\020\000\022\r\n\tExecuting\020\001\022\r\n\tCom" - "pleted\020\002*X\n\020ConsistencyLevel\022\n\n\006Strong\020\000" - "\022\013\n\007Session\020\001\022\013\n\007Bounded\020\002\022\016\n\nEventually" - "\020\003\022\016\n\nCustomized\020\004*\213\001\n\013ImportState\022\021\n\rIm" - "portPending\020\000\022\020\n\014ImportFailed\020\001\022\021\n\rImpor" - "tStarted\020\002\022\023\n\017ImportPersisted\020\005\022\023\n\017Impor" - "tCompleted\020\006\022\032\n\026ImportFailedAndCleaned\020\007" - "*2\n\nObjectType\022\016\n\nCollection\020\000\022\n\n\006Global" - "\020\001\022\010\n\004User\020\002*\365\007\n\017ObjectPrivilege\022\020\n\014Priv" - "ilegeAll\020\000\022\035\n\031PrivilegeCreateCollection\020" - "\001\022\033\n\027PrivilegeDropCollection\020\002\022\037\n\033Privil" - "egeDescribeCollection\020\003\022\034\n\030PrivilegeShow" - "Collections\020\004\022\021\n\rPrivilegeLoad\020\005\022\024\n\020Priv" - "ilegeRelease\020\006\022\027\n\023PrivilegeCompaction\020\007\022" - "\023\n\017PrivilegeInsert\020\010\022\023\n\017PrivilegeDelete\020" - "\t\022\032\n\026PrivilegeGetStatistics\020\n\022\030\n\024Privile" - "geCreateIndex\020\013\022\030\n\024PrivilegeIndexDetail\020" - "\014\022\026\n\022PrivilegeDropIndex\020\r\022\023\n\017PrivilegeSe" - "arch\020\016\022\022\n\016PrivilegeFlush\020\017\022\022\n\016PrivilegeQ" - "uery\020\020\022\030\n\024PrivilegeLoadBalance\020\021\022\023\n\017Priv" - "ilegeImport\020\022\022\034\n\030PrivilegeCreateOwnershi" - "p\020\023\022\027\n\023PrivilegeUpdateUser\020\024\022\032\n\026Privileg" - "eDropOwnership\020\025\022\034\n\030PrivilegeSelectOwner" - "ship\020\026\022\034\n\030PrivilegeManageOwnership\020\027\022\027\n\023" - "PrivilegeSelectUser\020\030\022 \n\034PrivilegeCreate" - "ResourceGroup\020\032\022\036\n\032PrivilegeDropResource" - "Group\020\033\022\"\n\036PrivilegeDescribeResourceGrou" - "p\020\034\022\037\n\033PrivilegeListResourceGroups\020\035\022\031\n\025" - "PrivilegeTransferNode\020\036\022\034\n\030PrivilegeTran" - "sferReplica\020\037\022\037\n\033PrivilegeGetLoadingProg" - "ress\020 \022\031\n\025PrivilegeGetLoadState\020!\022\035\n\031Pri" - "vilegeRenameCollection\020\"\022\033\n\027PrivilegeCre" - "ateDatabase\020#\022\031\n\025PrivilegeDropDatabase\020$" - "\022\032\n\026PrivilegeListDatabases\020%*S\n\tStateCod" - "e\022\020\n\014Initializing\020\000\022\013\n\007Healthy\020\001\022\014\n\010Abno" - "rmal\020\002\022\013\n\007StandBy\020\003\022\014\n\010Stopping\020\004*c\n\tLoa" - "dState\022\025\n\021LoadStateNotExist\020\000\022\024\n\020LoadSta" - "teNotLoad\020\001\022\024\n\020LoadStateLoading\020\002\022\023\n\017Loa" - "dStateLoaded\020\003:^\n\021privilege_ext_obj\022\037.go" - "ogle.protobuf.MessageOptions\030\351\007 \001(\0132!.mi" - "lvus.proto.common.PrivilegeExtBf\n\016io.mil" - "vus.grpcB\013CommonProtoP\001Z1github.com/milv" - "us-io/milvus-proto/go-api/commonpb\240\001\001\252\002\016" - "IO.Milvus.Grpcb\006proto3" + "dexs\030\004 \001(\005\"\325\001\n\nClientInfo\022\020\n\010sdk_type\030\001 " + "\001(\t\022\023\n\013sdk_version\030\002 \001(\t\022\022\n\nlocal_time\030\003" + " \001(\t\022\014\n\004user\030\004 \001(\t\022\014\n\004host\030\005 \001(\t\022\?\n\010rese" + "rved\030\006 \003(\0132-.milvus.proto.common.ClientI" + "nfo.ReservedEntry\032/\n\rReservedEntry\022\013\n\003ke" + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\343\001\n\nServerInf" + "o\022\022\n\nbuild_tags\030\001 \001(\t\022\022\n\nbuild_time\030\002 \001(" + "\t\022\022\n\ngit_commit\030\003 \001(\t\022\022\n\ngo_version\030\004 \001(" + "\t\022\023\n\013deploy_mode\030\005 \001(\t\022\?\n\010reserved\030\006 \003(\013" + "2-.milvus.proto.common.ServerInfo.Reserv" + "edEntry\032/\n\rReservedEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001*\327\n\n\tErrorCode\022\013\n\007Succes" + "s\020\000\022\023\n\017UnexpectedError\020\001\022\021\n\rConnectFaile" + "d\020\002\022\024\n\020PermissionDenied\020\003\022\027\n\023CollectionN" + "otExists\020\004\022\023\n\017IllegalArgument\020\005\022\024\n\020Illeg" + "alDimension\020\007\022\024\n\020IllegalIndexType\020\010\022\031\n\025I" + "llegalCollectionName\020\t\022\017\n\013IllegalTOPK\020\n\022" + "\024\n\020IllegalRowRecord\020\013\022\023\n\017IllegalVectorID" + "\020\014\022\027\n\023IllegalSearchResult\020\r\022\020\n\014FileNotFo" + "und\020\016\022\016\n\nMetaFailed\020\017\022\017\n\013CacheFailed\020\020\022\026" + "\n\022CannotCreateFolder\020\021\022\024\n\020CannotCreateFi" + "le\020\022\022\026\n\022CannotDeleteFolder\020\023\022\024\n\020CannotDe" + "leteFile\020\024\022\023\n\017BuildIndexError\020\025\022\020\n\014Illeg" + "alNLIST\020\026\022\025\n\021IllegalMetricType\020\027\022\017\n\013OutO" + "fMemory\020\030\022\021\n\rIndexNotExist\020\031\022\023\n\017EmptyCol" + "lection\020\032\022\033\n\027UpdateImportTaskFailure\020\033\022\032" + "\n\026CollectionNameNotFound\020\034\022\033\n\027CreateCred" + "entialFailure\020\035\022\033\n\027UpdateCredentialFailu" + "re\020\036\022\033\n\027DeleteCredentialFailure\020\037\022\030\n\024Get" + "CredentialFailure\020 \022\030\n\024ListCredUsersFail" + "ure\020!\022\022\n\016GetUserFailure\020\"\022\025\n\021CreateRoleF" + "ailure\020#\022\023\n\017DropRoleFailure\020$\022\032\n\026Operate" + "UserRoleFailure\020%\022\025\n\021SelectRoleFailure\020&" + "\022\025\n\021SelectUserFailure\020\'\022\031\n\025SelectResourc" + "eFailure\020(\022\033\n\027OperatePrivilegeFailure\020)\022" + "\026\n\022SelectGrantFailure\020*\022!\n\035RefreshPolicy" + "InfoCacheFailure\020+\022\025\n\021ListPolicyFailure\020" + ",\022\022\n\016NotShardLeader\020-\022\026\n\022NoReplicaAvaila" + "ble\020.\022\023\n\017SegmentNotFound\020/\022\r\n\tForceDeny\020" + "0\022\r\n\tRateLimit\0201\022\022\n\016NodeIDNotMatch\0202\022\024\n\020" + "UpsertAutoIDTrue\0203\022\034\n\030InsufficientMemory" + "ToLoad\0204\022\030\n\024MemoryQuotaExhausted\0205\022\026\n\022Di" + "skQuotaExhausted\0206\022\025\n\021TimeTickLongDelay\020" + "7\022\021\n\rNotReadyServe\0208\022\033\n\027NotReadyCoordAct" + "ivating\0209\022\022\n\016NotFoundTSafer\020:\022\017\n\013DataCoo" + "rdNA\020d\022\022\n\rDDRequestRace\020\350\007*c\n\nIndexState" + "\022\022\n\016IndexStateNone\020\000\022\014\n\010Unissued\020\001\022\016\n\nIn" + "Progress\020\002\022\014\n\010Finished\020\003\022\n\n\006Failed\020\004\022\t\n\005" + "Retry\020\005*\202\001\n\014SegmentState\022\024\n\020SegmentState" + "None\020\000\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022\n\n\006Sea" + "led\020\003\022\013\n\007Flushed\020\004\022\014\n\010Flushing\020\005\022\013\n\007Drop" + "ped\020\006\022\r\n\tImporting\020\007*>\n\017PlaceholderType\022" + "\010\n\004None\020\000\022\020\n\014BinaryVector\020d\022\017\n\013FloatVect" + "or\020e*\223\017\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n\020Creat" + "eCollection\020d\022\022\n\016DropCollection\020e\022\021\n\rHas" + "Collection\020f\022\026\n\022DescribeCollection\020g\022\023\n\017" + "ShowCollections\020h\022\024\n\020GetSystemConfigs\020i\022" + "\022\n\016LoadCollection\020j\022\025\n\021ReleaseCollection" + "\020k\022\017\n\013CreateAlias\020l\022\r\n\tDropAlias\020m\022\016\n\nAl" + "terAlias\020n\022\023\n\017AlterCollection\020o\022\024\n\020Renam" + "eCollection\020p\022\024\n\017CreatePartition\020\310\001\022\022\n\rD" + "ropPartition\020\311\001\022\021\n\014HasPartition\020\312\001\022\026\n\021De" + "scribePartition\020\313\001\022\023\n\016ShowPartitions\020\314\001\022" + "\023\n\016LoadPartitions\020\315\001\022\026\n\021ReleasePartition" + "s\020\316\001\022\021\n\014ShowSegments\020\372\001\022\024\n\017DescribeSegme" + "nt\020\373\001\022\021\n\014LoadSegments\020\374\001\022\024\n\017ReleaseSegme" + "nts\020\375\001\022\024\n\017HandoffSegments\020\376\001\022\030\n\023LoadBala" + "nceSegments\020\377\001\022\025\n\020DescribeSegments\020\200\002\022\020\n" + "\013CreateIndex\020\254\002\022\022\n\rDescribeIndex\020\255\002\022\016\n\tD" + "ropIndex\020\256\002\022\013\n\006Insert\020\220\003\022\013\n\006Delete\020\221\003\022\n\n" + "\005Flush\020\222\003\022\027\n\022ResendSegmentStats\020\223\003\022\013\n\006Se" + "arch\020\364\003\022\021\n\014SearchResult\020\365\003\022\022\n\rGetIndexSt" + "ate\020\366\003\022\032\n\025GetIndexBuildProgress\020\367\003\022\034\n\027Ge" + "tCollectionStatistics\020\370\003\022\033\n\026GetPartition" + "Statistics\020\371\003\022\r\n\010Retrieve\020\372\003\022\023\n\016Retrieve" + "Result\020\373\003\022\024\n\017WatchDmChannels\020\374\003\022\025\n\020Remov" + "eDmChannels\020\375\003\022\027\n\022WatchQueryChannels\020\376\003\022" + "\030\n\023RemoveQueryChannels\020\377\003\022\035\n\030SealedSegme" + "ntsChangeInfo\020\200\004\022\027\n\022WatchDeltaChannels\020\201" + "\004\022\024\n\017GetShardLeaders\020\202\004\022\020\n\013GetReplicas\020\203" + "\004\022\023\n\016UnsubDmChannel\020\204\004\022\024\n\017GetDistributio" + "n\020\205\004\022\025\n\020SyncDistribution\020\206\004\022\020\n\013SegmentIn" + "fo\020\330\004\022\017\n\nSystemInfo\020\331\004\022\024\n\017GetRecoveryInf" + "o\020\332\004\022\024\n\017GetSegmentState\020\333\004\022\r\n\010TimeTick\020\260" + "\t\022\023\n\016QueryNodeStats\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016" + "\n\tRequestID\020\263\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017Alloc" + "ateSegment\020\265\t\022\026\n\021SegmentStatistics\020\266\t\022\025\n" + "\020SegmentFlushDone\020\267\t\022\017\n\nDataNodeTt\020\270\t\022\014\n" + "\007Connect\020\271\t\022\024\n\017ListClientInfos\020\272\t\022\025\n\020Cre" + "ateCredential\020\334\013\022\022\n\rGetCredential\020\335\013\022\025\n\020" + "DeleteCredential\020\336\013\022\025\n\020UpdateCredential\020" + "\337\013\022\026\n\021ListCredUsernames\020\340\013\022\017\n\nCreateRole" + "\020\300\014\022\r\n\010DropRole\020\301\014\022\024\n\017OperateUserRole\020\302\014" + "\022\017\n\nSelectRole\020\303\014\022\017\n\nSelectUser\020\304\014\022\023\n\016Se" + "lectResource\020\305\014\022\025\n\020OperatePrivilege\020\306\014\022\020" + "\n\013SelectGrant\020\307\014\022\033\n\026RefreshPolicyInfoCac" + "he\020\310\014\022\017\n\nListPolicy\020\311\014\022\030\n\023CreateResource" + "Group\020\244\r\022\026\n\021DropResourceGroup\020\245\r\022\027\n\022List" + "ResourceGroups\020\246\r\022\032\n\025DescribeResourceGro" + "up\020\247\r\022\021\n\014TransferNode\020\250\r\022\024\n\017TransferRepl" + "ica\020\251\r\022\023\n\016CreateDatabase\020\211\016\022\021\n\014DropDatab" + "ase\020\212\016\022\022\n\rListDatabases\020\213\016*\"\n\007DslType\022\007\n" + "\003Dsl\020\000\022\016\n\nBoolExprV1\020\001*B\n\017CompactionStat" + "e\022\021\n\rUndefiedState\020\000\022\r\n\tExecuting\020\001\022\r\n\tC" + "ompleted\020\002*X\n\020ConsistencyLevel\022\n\n\006Strong" + "\020\000\022\013\n\007Session\020\001\022\013\n\007Bounded\020\002\022\016\n\nEventual" + "ly\020\003\022\016\n\nCustomized\020\004*\213\001\n\013ImportState\022\021\n\r" + "ImportPending\020\000\022\020\n\014ImportFailed\020\001\022\021\n\rImp" + "ortStarted\020\002\022\023\n\017ImportPersisted\020\005\022\023\n\017Imp" + "ortCompleted\020\006\022\032\n\026ImportFailedAndCleaned" + "\020\007*2\n\nObjectType\022\016\n\nCollection\020\000\022\n\n\006Glob" + "al\020\001\022\010\n\004User\020\002*\365\007\n\017ObjectPrivilege\022\020\n\014Pr" + "ivilegeAll\020\000\022\035\n\031PrivilegeCreateCollectio" + "n\020\001\022\033\n\027PrivilegeDropCollection\020\002\022\037\n\033Priv" + "ilegeDescribeCollection\020\003\022\034\n\030PrivilegeSh" + "owCollections\020\004\022\021\n\rPrivilegeLoad\020\005\022\024\n\020Pr" + "ivilegeRelease\020\006\022\027\n\023PrivilegeCompaction\020" + "\007\022\023\n\017PrivilegeInsert\020\010\022\023\n\017PrivilegeDelet" + "e\020\t\022\032\n\026PrivilegeGetStatistics\020\n\022\030\n\024Privi" + "legeCreateIndex\020\013\022\030\n\024PrivilegeIndexDetai" + "l\020\014\022\026\n\022PrivilegeDropIndex\020\r\022\023\n\017Privilege" + "Search\020\016\022\022\n\016PrivilegeFlush\020\017\022\022\n\016Privileg" + "eQuery\020\020\022\030\n\024PrivilegeLoadBalance\020\021\022\023\n\017Pr" + "ivilegeImport\020\022\022\034\n\030PrivilegeCreateOwners" + "hip\020\023\022\027\n\023PrivilegeUpdateUser\020\024\022\032\n\026Privil" + "egeDropOwnership\020\025\022\034\n\030PrivilegeSelectOwn" + "ership\020\026\022\034\n\030PrivilegeManageOwnership\020\027\022\027" + "\n\023PrivilegeSelectUser\020\030\022 \n\034PrivilegeCrea" + "teResourceGroup\020\032\022\036\n\032PrivilegeDropResour" + "ceGroup\020\033\022\"\n\036PrivilegeDescribeResourceGr" + "oup\020\034\022\037\n\033PrivilegeListResourceGroups\020\035\022\031" + "\n\025PrivilegeTransferNode\020\036\022\034\n\030PrivilegeTr" + "ansferReplica\020\037\022\037\n\033PrivilegeGetLoadingPr" + "ogress\020 \022\031\n\025PrivilegeGetLoadState\020!\022\035\n\031P" + "rivilegeRenameCollection\020\"\022\033\n\027PrivilegeC" + "reateDatabase\020#\022\031\n\025PrivilegeDropDatabase" + "\020$\022\032\n\026PrivilegeListDatabases\020%*S\n\tStateC" + "ode\022\020\n\014Initializing\020\000\022\013\n\007Healthy\020\001\022\014\n\010Ab" + "normal\020\002\022\013\n\007StandBy\020\003\022\014\n\010Stopping\020\004*c\n\tL" + "oadState\022\025\n\021LoadStateNotExist\020\000\022\024\n\020LoadS" + "tateNotLoad\020\001\022\024\n\020LoadStateLoading\020\002\022\023\n\017L" + "oadStateLoaded\020\003:^\n\021privilege_ext_obj\022\037." + "google.protobuf.MessageOptions\030\351\007 \001(\0132!." + "milvus.proto.common.PrivilegeExtBf\n\016io.m" + "ilvus.grpcB\013CommonProtoP\001Z1github.com/mi" + "lvus-io/milvus-proto/go-api/commonpb\240\001\001\252" + "\002\016IO.Milvus.Grpcb\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = { &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, }; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_common_2eproto_sccs[11] = { +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_common_2eproto_sccs[15] = { &scc_info_Address_common_2eproto.base, &scc_info_Blob_common_2eproto.base, + &scc_info_ClientInfo_common_2eproto.base, + &scc_info_ClientInfo_ReservedEntry_DoNotUse_common_2eproto.base, &scc_info_DMLMsgHeader_common_2eproto.base, &scc_info_KeyDataPair_common_2eproto.base, &scc_info_KeyValuePair_common_2eproto.base, @@ -513,15 +649,17 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com &scc_info_PlaceholderGroup_common_2eproto.base, &scc_info_PlaceholderValue_common_2eproto.base, &scc_info_PrivilegeExt_common_2eproto.base, + &scc_info_ServerInfo_common_2eproto.base, + &scc_info_ServerInfo_ReservedEntry_DoNotUse_common_2eproto.base, &scc_info_Status_common_2eproto.base, }; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once; static bool descriptor_table_common_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = { - &descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 6302, - &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 11, 1, + &descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 6784, + &descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 15, 1, schemas, file_default_instances, TableStruct_common_2eproto::offsets, - file_level_metadata_common_2eproto, 11, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto, + file_level_metadata_common_2eproto, 15, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto, }; // Force running AddDescriptors() at dynamic initialization time. @@ -727,6 +865,8 @@ bool MsgType_IsValid(int value) { case 1206: case 1207: case 1208: + case 1209: + case 1210: case 1500: case 1501: case 1502: @@ -4481,6 +4621,1364 @@ void PrivilegeExt::InternalSwap(PrivilegeExt* other) { return GetMetadataStatic(); } + +// =================================================================== + +ClientInfo_ReservedEntry_DoNotUse::ClientInfo_ReservedEntry_DoNotUse() {} +ClientInfo_ReservedEntry_DoNotUse::ClientInfo_ReservedEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void ClientInfo_ReservedEntry_DoNotUse::MergeFrom(const ClientInfo_ReservedEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata ClientInfo_ReservedEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void ClientInfo_ReservedEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void ClientInfo::InitAsDefaultInstance() { +} +class ClientInfo::_Internal { + public: +}; + +ClientInfo::ClientInfo() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.proto.common.ClientInfo) +} +ClientInfo::ClientInfo(const ClientInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + reserved_.MergeFrom(from.reserved_); + sdk_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.sdk_type().empty()) { + sdk_type_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sdk_type_); + } + sdk_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.sdk_version().empty()) { + sdk_version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sdk_version_); + } + local_time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.local_time().empty()) { + local_time_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.local_time_); + } + user_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.user().empty()) { + user_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.user_); + } + host_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.host().empty()) { + host_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.host_); + } + // @@protoc_insertion_point(copy_constructor:milvus.proto.common.ClientInfo) +} + +void ClientInfo::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ClientInfo_common_2eproto.base); + sdk_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + sdk_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + local_time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + user_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + host_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +ClientInfo::~ClientInfo() { + // @@protoc_insertion_point(destructor:milvus.proto.common.ClientInfo) + SharedDtor(); +} + +void ClientInfo::SharedDtor() { + sdk_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + sdk_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + local_time_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + user_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + host_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ClientInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ClientInfo& ClientInfo::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ClientInfo_common_2eproto.base); + return *internal_default_instance(); +} + + +void ClientInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.proto.common.ClientInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + reserved_.Clear(); + sdk_type_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + sdk_version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + local_time_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + user_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + host_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ClientInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string sdk_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_sdk_type(), ptr, ctx, "milvus.proto.common.ClientInfo.sdk_type"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string sdk_version = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_sdk_version(), ptr, ctx, "milvus.proto.common.ClientInfo.sdk_version"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string local_time = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_local_time(), ptr, ctx, "milvus.proto.common.ClientInfo.local_time"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string user = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_user(), ptr, ctx, "milvus.proto.common.ClientInfo.user"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string host = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_host(), ptr, ctx, "milvus.proto.common.ClientInfo.host"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map reserved = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&reserved_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ClientInfo::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.proto.common.ClientInfo) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string sdk_type = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_sdk_type())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->sdk_type().data(), static_cast(this->sdk_type().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.sdk_type")); + } else { + goto handle_unusual; + } + break; + } + + // string sdk_version = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_sdk_version())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->sdk_version().data(), static_cast(this->sdk_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.sdk_version")); + } else { + goto handle_unusual; + } + break; + } + + // string local_time = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_local_time())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->local_time().data(), static_cast(this->local_time().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.local_time")); + } else { + goto handle_unusual; + } + break; + } + + // string user = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_user())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->user().data(), static_cast(this->user().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.user")); + } else { + goto handle_unusual; + } + break; + } + + // string host = 5; + case 5: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_host())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), static_cast(this->host().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.host")); + } else { + goto handle_unusual; + } + break; + } + + // map reserved = 6; + case 6: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + ClientInfo_ReservedEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ClientInfo_ReservedEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 >, + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&reserved_); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.ReservedEntry.key")); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + parser.value().data(), static_cast(parser.value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ClientInfo.ReservedEntry.value")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.proto.common.ClientInfo) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.proto.common.ClientInfo) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ClientInfo::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.proto.common.ClientInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string sdk_type = 1; + if (this->sdk_type().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->sdk_type().data(), static_cast(this->sdk_type().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.sdk_type"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->sdk_type(), output); + } + + // string sdk_version = 2; + if (this->sdk_version().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->sdk_version().data(), static_cast(this->sdk_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.sdk_version"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->sdk_version(), output); + } + + // string local_time = 3; + if (this->local_time().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->local_time().data(), static_cast(this->local_time().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.local_time"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->local_time(), output); + } + + // string user = 4; + if (this->user().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->user().data(), static_cast(this->user().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.user"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->user(), output); + } + + // string host = 5; + if (this->host().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), static_cast(this->host().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.host"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->host(), output); + } + + // map reserved = 6; + if (!this->reserved().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.ReservedEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.ReservedEntry.value"); + } + }; + + if (output->IsSerializationDeterministic() && + this->reserved().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->reserved().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + ClientInfo_ReservedEntry_DoNotUse::Funcs::SerializeToCodedStream(6, items[static_cast(i)]->first, items[static_cast(i)]->second, output); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it) { + ClientInfo_ReservedEntry_DoNotUse::Funcs::SerializeToCodedStream(6, it->first, it->second, output); + Utf8Check::Check(&(*it)); + } + } + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.proto.common.ClientInfo) +} + +::PROTOBUF_NAMESPACE_ID::uint8* ClientInfo::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.ClientInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string sdk_type = 1; + if (this->sdk_type().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->sdk_type().data(), static_cast(this->sdk_type().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.sdk_type"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->sdk_type(), target); + } + + // string sdk_version = 2; + if (this->sdk_version().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->sdk_version().data(), static_cast(this->sdk_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.sdk_version"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 2, this->sdk_version(), target); + } + + // string local_time = 3; + if (this->local_time().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->local_time().data(), static_cast(this->local_time().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.local_time"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 3, this->local_time(), target); + } + + // string user = 4; + if (this->user().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->user().data(), static_cast(this->user().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.user"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 4, this->user(), target); + } + + // string host = 5; + if (this->host().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), static_cast(this->host().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.host"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 5, this->host(), target); + } + + // map reserved = 6; + if (!this->reserved().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.ReservedEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ClientInfo.ReservedEntry.value"); + } + }; + + if (false && + this->reserved().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->reserved().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = ClientInfo_ReservedEntry_DoNotUse::Funcs::SerializeToArray(6, items[static_cast(i)]->first, items[static_cast(i)]->second, target); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it) { + target = ClientInfo_ReservedEntry_DoNotUse::Funcs::SerializeToArray(6, it->first, it->second, target); + Utf8Check::Check(&(*it)); + } + } + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.common.ClientInfo) + return target; +} + +size_t ClientInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.proto.common.ClientInfo) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map reserved = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->reserved_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it) { + total_size += ClientInfo_ReservedEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // string sdk_type = 1; + if (this->sdk_type().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->sdk_type()); + } + + // string sdk_version = 2; + if (this->sdk_version().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->sdk_version()); + } + + // string local_time = 3; + if (this->local_time().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->local_time()); + } + + // string user = 4; + if (this->user().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->user()); + } + + // string host = 5; + if (this->host().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->host()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ClientInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.common.ClientInfo) + GOOGLE_DCHECK_NE(&from, this); + const ClientInfo* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.common.ClientInfo) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.common.ClientInfo) + MergeFrom(*source); + } +} + +void ClientInfo::MergeFrom(const ClientInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.common.ClientInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + reserved_.MergeFrom(from.reserved_); + if (from.sdk_type().size() > 0) { + + sdk_type_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sdk_type_); + } + if (from.sdk_version().size() > 0) { + + sdk_version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sdk_version_); + } + if (from.local_time().size() > 0) { + + local_time_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.local_time_); + } + if (from.user().size() > 0) { + + user_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.user_); + } + if (from.host().size() > 0) { + + host_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.host_); + } +} + +void ClientInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.common.ClientInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ClientInfo::CopyFrom(const ClientInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.common.ClientInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientInfo::IsInitialized() const { + return true; +} + +void ClientInfo::InternalSwap(ClientInfo* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + reserved_.Swap(&other->reserved_); + sdk_type_.Swap(&other->sdk_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + sdk_version_.Swap(&other->sdk_version_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + local_time_.Swap(&other->local_time_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + user_.Swap(&other->user_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + host_.Swap(&other->host_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ClientInfo::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +ServerInfo_ReservedEntry_DoNotUse::ServerInfo_ReservedEntry_DoNotUse() {} +ServerInfo_ReservedEntry_DoNotUse::ServerInfo_ReservedEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void ServerInfo_ReservedEntry_DoNotUse::MergeFrom(const ServerInfo_ReservedEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata ServerInfo_ReservedEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void ServerInfo_ReservedEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void ServerInfo::InitAsDefaultInstance() { +} +class ServerInfo::_Internal { + public: +}; + +ServerInfo::ServerInfo() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:milvus.proto.common.ServerInfo) +} +ServerInfo::ServerInfo(const ServerInfo& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + reserved_.MergeFrom(from.reserved_); + build_tags_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.build_tags().empty()) { + build_tags_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.build_tags_); + } + build_time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.build_time().empty()) { + build_time_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.build_time_); + } + git_commit_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.git_commit().empty()) { + git_commit_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.git_commit_); + } + go_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.go_version().empty()) { + go_version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.go_version_); + } + deploy_mode_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.deploy_mode().empty()) { + deploy_mode_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.deploy_mode_); + } + // @@protoc_insertion_point(copy_constructor:milvus.proto.common.ServerInfo) +} + +void ServerInfo::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServerInfo_common_2eproto.base); + build_tags_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + build_time_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + git_commit_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + go_version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + deploy_mode_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +ServerInfo::~ServerInfo() { + // @@protoc_insertion_point(destructor:milvus.proto.common.ServerInfo) + SharedDtor(); +} + +void ServerInfo::SharedDtor() { + build_tags_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + build_time_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + git_commit_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + go_version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + deploy_mode_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ServerInfo::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ServerInfo& ServerInfo::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServerInfo_common_2eproto.base); + return *internal_default_instance(); +} + + +void ServerInfo::Clear() { +// @@protoc_insertion_point(message_clear_start:milvus.proto.common.ServerInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + reserved_.Clear(); + build_tags_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + build_time_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + git_commit_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + go_version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + deploy_mode_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ServerInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string build_tags = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_build_tags(), ptr, ctx, "milvus.proto.common.ServerInfo.build_tags"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string build_time = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_build_time(), ptr, ctx, "milvus.proto.common.ServerInfo.build_time"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string git_commit = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_git_commit(), ptr, ctx, "milvus.proto.common.ServerInfo.git_commit"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string go_version = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_go_version(), ptr, ctx, "milvus.proto.common.ServerInfo.go_version"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string deploy_mode = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_deploy_mode(), ptr, ctx, "milvus.proto.common.ServerInfo.deploy_mode"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map reserved = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&reserved_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ServerInfo::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:milvus.proto.common.ServerInfo) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string build_tags = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_build_tags())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->build_tags().data(), static_cast(this->build_tags().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.build_tags")); + } else { + goto handle_unusual; + } + break; + } + + // string build_time = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_build_time())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->build_time().data(), static_cast(this->build_time().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.build_time")); + } else { + goto handle_unusual; + } + break; + } + + // string git_commit = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_git_commit())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->git_commit().data(), static_cast(this->git_commit().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.git_commit")); + } else { + goto handle_unusual; + } + break; + } + + // string go_version = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_go_version())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->go_version().data(), static_cast(this->go_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.go_version")); + } else { + goto handle_unusual; + } + break; + } + + // string deploy_mode = 5; + case 5: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_deploy_mode())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->deploy_mode().data(), static_cast(this->deploy_mode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.deploy_mode")); + } else { + goto handle_unusual; + } + break; + } + + // map reserved = 6; + case 6: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + ServerInfo_ReservedEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ServerInfo_ReservedEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 >, + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&reserved_); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast(parser.key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.ReservedEntry.key")); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + parser.value().data(), static_cast(parser.value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "milvus.proto.common.ServerInfo.ReservedEntry.value")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:milvus.proto.common.ServerInfo) + return true; +failure: + // @@protoc_insertion_point(parse_failure:milvus.proto.common.ServerInfo) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ServerInfo::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:milvus.proto.common.ServerInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string build_tags = 1; + if (this->build_tags().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->build_tags().data(), static_cast(this->build_tags().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.build_tags"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->build_tags(), output); + } + + // string build_time = 2; + if (this->build_time().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->build_time().data(), static_cast(this->build_time().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.build_time"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->build_time(), output); + } + + // string git_commit = 3; + if (this->git_commit().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->git_commit().data(), static_cast(this->git_commit().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.git_commit"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->git_commit(), output); + } + + // string go_version = 4; + if (this->go_version().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->go_version().data(), static_cast(this->go_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.go_version"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->go_version(), output); + } + + // string deploy_mode = 5; + if (this->deploy_mode().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->deploy_mode().data(), static_cast(this->deploy_mode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.deploy_mode"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->deploy_mode(), output); + } + + // map reserved = 6; + if (!this->reserved().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.ReservedEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.ReservedEntry.value"); + } + }; + + if (output->IsSerializationDeterministic() && + this->reserved().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->reserved().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + ServerInfo_ReservedEntry_DoNotUse::Funcs::SerializeToCodedStream(6, items[static_cast(i)]->first, items[static_cast(i)]->second, output); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it) { + ServerInfo_ReservedEntry_DoNotUse::Funcs::SerializeToCodedStream(6, it->first, it->second, output); + Utf8Check::Check(&(*it)); + } + } + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:milvus.proto.common.ServerInfo) +} + +::PROTOBUF_NAMESPACE_ID::uint8* ServerInfo::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:milvus.proto.common.ServerInfo) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string build_tags = 1; + if (this->build_tags().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->build_tags().data(), static_cast(this->build_tags().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.build_tags"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->build_tags(), target); + } + + // string build_time = 2; + if (this->build_time().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->build_time().data(), static_cast(this->build_time().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.build_time"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 2, this->build_time(), target); + } + + // string git_commit = 3; + if (this->git_commit().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->git_commit().data(), static_cast(this->git_commit().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.git_commit"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 3, this->git_commit(), target); + } + + // string go_version = 4; + if (this->go_version().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->go_version().data(), static_cast(this->go_version().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.go_version"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 4, this->go_version(), target); + } + + // string deploy_mode = 5; + if (this->deploy_mode().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->deploy_mode().data(), static_cast(this->deploy_mode().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.deploy_mode"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 5, this->deploy_mode(), target); + } + + // map reserved = 6; + if (!this->reserved().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.ReservedEntry.key"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->second.data(), static_cast(p->second.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "milvus.proto.common.ServerInfo.ReservedEntry.value"); + } + }; + + if (false && + this->reserved().size() > 1) { + ::std::unique_ptr items( + new SortItem[this->reserved().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it, ++n) { + items[static_cast(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = ServerInfo_ReservedEntry_DoNotUse::Funcs::SerializeToArray(6, items[static_cast(i)]->first, items[static_cast(i)]->second, target); + Utf8Check::Check(&(*items[static_cast(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it) { + target = ServerInfo_ReservedEntry_DoNotUse::Funcs::SerializeToArray(6, it->first, it->second, target); + Utf8Check::Check(&(*it)); + } + } + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:milvus.proto.common.ServerInfo) + return target; +} + +size_t ServerInfo::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:milvus.proto.common.ServerInfo) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map reserved = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->reserved_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator + it = this->reserved().begin(); + it != this->reserved().end(); ++it) { + total_size += ServerInfo_ReservedEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // string build_tags = 1; + if (this->build_tags().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->build_tags()); + } + + // string build_time = 2; + if (this->build_time().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->build_time()); + } + + // string git_commit = 3; + if (this->git_commit().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->git_commit()); + } + + // string go_version = 4; + if (this->go_version().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->go_version()); + } + + // string deploy_mode = 5; + if (this->deploy_mode().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->deploy_mode()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ServerInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.common.ServerInfo) + GOOGLE_DCHECK_NE(&from, this); + const ServerInfo* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.common.ServerInfo) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.common.ServerInfo) + MergeFrom(*source); + } +} + +void ServerInfo::MergeFrom(const ServerInfo& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.common.ServerInfo) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + reserved_.MergeFrom(from.reserved_); + if (from.build_tags().size() > 0) { + + build_tags_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.build_tags_); + } + if (from.build_time().size() > 0) { + + build_time_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.build_time_); + } + if (from.git_commit().size() > 0) { + + git_commit_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.git_commit_); + } + if (from.go_version().size() > 0) { + + go_version_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.go_version_); + } + if (from.deploy_mode().size() > 0) { + + deploy_mode_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.deploy_mode_); + } +} + +void ServerInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.common.ServerInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerInfo::CopyFrom(const ServerInfo& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.common.ServerInfo) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerInfo::IsInitialized() const { + return true; +} + +void ServerInfo::InternalSwap(ServerInfo* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + reserved_.Swap(&other->reserved_); + build_tags_.Swap(&other->build_tags_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + build_time_.Swap(&other->build_time_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + git_commit_.Swap(&other->git_commit_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + go_version_.Swap(&other->go_version_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + deploy_mode_.Swap(&other->deploy_mode_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ServerInfo::GetMetadata() const { + return GetMetadataStatic(); +} + ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions, ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::milvus::proto::common::PrivilegeExt >, 11, false > privilege_ext_obj(kPrivilegeExtObjFieldNumber, *::milvus::proto::common::PrivilegeExt::internal_default_instance()); @@ -4523,6 +6021,18 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::common::DMLMsgHeader* Arena::Creat template<> PROTOBUF_NOINLINE ::milvus::proto::common::PrivilegeExt* Arena::CreateMaybeMessage< ::milvus::proto::common::PrivilegeExt >(Arena* arena) { return Arena::CreateInternal< ::milvus::proto::common::PrivilegeExt >(arena); } +template<> PROTOBUF_NOINLINE ::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse* Arena::CreateMaybeMessage< ::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::proto::common::ClientInfo* Arena::CreateMaybeMessage< ::milvus::proto::common::ClientInfo >(Arena* arena) { + return Arena::CreateInternal< ::milvus::proto::common::ClientInfo >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse* Arena::CreateMaybeMessage< ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse >(Arena* arena) { + return Arena::CreateInternal< ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::milvus::proto::common::ServerInfo* Arena::CreateMaybeMessage< ::milvus::proto::common::ServerInfo >(Arena* arena) { + return Arena::CreateInternal< ::milvus::proto::common::ServerInfo >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/internal/core/src/pb/common.pb.h b/internal/core/src/pb/common.pb.h index 9abfeabca8..b28fb43d82 100644 --- a/internal/core/src/pb/common.pb.h +++ b/internal/core/src/pb/common.pb.h @@ -31,6 +31,9 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include #include #include #include @@ -49,7 +52,7 @@ struct TableStruct_common_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[11] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[15] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; @@ -65,6 +68,12 @@ extern AddressDefaultTypeInternal _Address_default_instance_; class Blob; class BlobDefaultTypeInternal; extern BlobDefaultTypeInternal _Blob_default_instance_; +class ClientInfo; +class ClientInfoDefaultTypeInternal; +extern ClientInfoDefaultTypeInternal _ClientInfo_default_instance_; +class ClientInfo_ReservedEntry_DoNotUse; +class ClientInfo_ReservedEntry_DoNotUseDefaultTypeInternal; +extern ClientInfo_ReservedEntry_DoNotUseDefaultTypeInternal _ClientInfo_ReservedEntry_DoNotUse_default_instance_; class DMLMsgHeader; class DMLMsgHeaderDefaultTypeInternal; extern DMLMsgHeaderDefaultTypeInternal _DMLMsgHeader_default_instance_; @@ -89,6 +98,12 @@ extern PlaceholderValueDefaultTypeInternal _PlaceholderValue_default_instance_; class PrivilegeExt; class PrivilegeExtDefaultTypeInternal; extern PrivilegeExtDefaultTypeInternal _PrivilegeExt_default_instance_; +class ServerInfo; +class ServerInfoDefaultTypeInternal; +extern ServerInfoDefaultTypeInternal _ServerInfo_default_instance_; +class ServerInfo_ReservedEntry_DoNotUse; +class ServerInfo_ReservedEntry_DoNotUseDefaultTypeInternal; +extern ServerInfo_ReservedEntry_DoNotUseDefaultTypeInternal _ServerInfo_ReservedEntry_DoNotUse_default_instance_; class Status; class StatusDefaultTypeInternal; extern StatusDefaultTypeInternal _Status_default_instance_; @@ -98,6 +113,8 @@ extern StatusDefaultTypeInternal _Status_default_instance_; PROTOBUF_NAMESPACE_OPEN template<> ::milvus::proto::common::Address* Arena::CreateMaybeMessage<::milvus::proto::common::Address>(Arena*); template<> ::milvus::proto::common::Blob* Arena::CreateMaybeMessage<::milvus::proto::common::Blob>(Arena*); +template<> ::milvus::proto::common::ClientInfo* Arena::CreateMaybeMessage<::milvus::proto::common::ClientInfo>(Arena*); +template<> ::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse* Arena::CreateMaybeMessage<::milvus::proto::common::ClientInfo_ReservedEntry_DoNotUse>(Arena*); template<> ::milvus::proto::common::DMLMsgHeader* Arena::CreateMaybeMessage<::milvus::proto::common::DMLMsgHeader>(Arena*); template<> ::milvus::proto::common::KeyDataPair* Arena::CreateMaybeMessage<::milvus::proto::common::KeyDataPair>(Arena*); template<> ::milvus::proto::common::KeyValuePair* Arena::CreateMaybeMessage<::milvus::proto::common::KeyValuePair>(Arena*); @@ -106,6 +123,8 @@ template<> ::milvus::proto::common::MsgHeader* Arena::CreateMaybeMessage<::milvu template<> ::milvus::proto::common::PlaceholderGroup* Arena::CreateMaybeMessage<::milvus::proto::common::PlaceholderGroup>(Arena*); template<> ::milvus::proto::common::PlaceholderValue* Arena::CreateMaybeMessage<::milvus::proto::common::PlaceholderValue>(Arena*); template<> ::milvus::proto::common::PrivilegeExt* Arena::CreateMaybeMessage<::milvus::proto::common::PrivilegeExt>(Arena*); +template<> ::milvus::proto::common::ServerInfo* Arena::CreateMaybeMessage<::milvus::proto::common::ServerInfo>(Arena*); +template<> ::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse* Arena::CreateMaybeMessage<::milvus::proto::common::ServerInfo_ReservedEntry_DoNotUse>(Arena*); template<> ::milvus::proto::common::Status* Arena::CreateMaybeMessage<::milvus::proto::common::Status>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace milvus { @@ -349,6 +368,8 @@ enum MsgType : int { SegmentStatistics = 1206, SegmentFlushDone = 1207, DataNodeTt = 1208, + Connect = 1209, + ListClientInfos = 1210, CreateCredential = 1500, GetCredential = 1501, DeleteCredential = 1502, @@ -2261,6 +2282,484 @@ class PrivilegeExt : mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_common_2eproto; }; +// ------------------------------------------------------------------- + +class ClientInfo_ReservedEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ClientInfo_ReservedEntry_DoNotUse(); + ClientInfo_ReservedEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ClientInfo_ReservedEntry_DoNotUse& other); + static const ClientInfo_ReservedEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ClientInfo_ReservedEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.proto.common.ClientInfo.ReservedEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.proto.common.ClientInfo.ReservedEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_common_2eproto); + return ::descriptor_table_common_2eproto.file_level_metadata[11]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class ClientInfo : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.ClientInfo) */ { + public: + ClientInfo(); + virtual ~ClientInfo(); + + ClientInfo(const ClientInfo& from); + ClientInfo(ClientInfo&& from) noexcept + : ClientInfo() { + *this = ::std::move(from); + } + + inline ClientInfo& operator=(const ClientInfo& from) { + CopyFrom(from); + return *this; + } + inline ClientInfo& operator=(ClientInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const ClientInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ClientInfo* internal_default_instance() { + return reinterpret_cast( + &_ClientInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(ClientInfo& a, ClientInfo& b) { + a.Swap(&b); + } + inline void Swap(ClientInfo* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ClientInfo* New() const final { + return CreateMaybeMessage(nullptr); + } + + ClientInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ClientInfo& from); + void MergeFrom(const ClientInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ClientInfo* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.proto.common.ClientInfo"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_common_2eproto); + return ::descriptor_table_common_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kReservedFieldNumber = 6, + kSdkTypeFieldNumber = 1, + kSdkVersionFieldNumber = 2, + kLocalTimeFieldNumber = 3, + kUserFieldNumber = 4, + kHostFieldNumber = 5, + }; + // map reserved = 6; + int reserved_size() const; + void clear_reserved(); + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + reserved() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_reserved(); + + // string sdk_type = 1; + void clear_sdk_type(); + const std::string& sdk_type() const; + void set_sdk_type(const std::string& value); + void set_sdk_type(std::string&& value); + void set_sdk_type(const char* value); + void set_sdk_type(const char* value, size_t size); + std::string* mutable_sdk_type(); + std::string* release_sdk_type(); + void set_allocated_sdk_type(std::string* sdk_type); + + // string sdk_version = 2; + void clear_sdk_version(); + const std::string& sdk_version() const; + void set_sdk_version(const std::string& value); + void set_sdk_version(std::string&& value); + void set_sdk_version(const char* value); + void set_sdk_version(const char* value, size_t size); + std::string* mutable_sdk_version(); + std::string* release_sdk_version(); + void set_allocated_sdk_version(std::string* sdk_version); + + // string local_time = 3; + void clear_local_time(); + const std::string& local_time() const; + void set_local_time(const std::string& value); + void set_local_time(std::string&& value); + void set_local_time(const char* value); + void set_local_time(const char* value, size_t size); + std::string* mutable_local_time(); + std::string* release_local_time(); + void set_allocated_local_time(std::string* local_time); + + // string user = 4; + void clear_user(); + const std::string& user() const; + void set_user(const std::string& value); + void set_user(std::string&& value); + void set_user(const char* value); + void set_user(const char* value, size_t size); + std::string* mutable_user(); + std::string* release_user(); + void set_allocated_user(std::string* user); + + // string host = 5; + void clear_host(); + const std::string& host() const; + void set_host(const std::string& value); + void set_host(std::string&& value); + void set_host(const char* value); + void set_host(const char* value, size_t size); + std::string* mutable_host(); + std::string* release_host(); + void set_allocated_host(std::string* host); + + // @@protoc_insertion_point(class_scope:milvus.proto.common.ClientInfo) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ClientInfo_ReservedEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > reserved_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sdk_type_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sdk_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr local_time_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr user_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr host_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_common_2eproto; +}; +// ------------------------------------------------------------------- + +class ServerInfo_ReservedEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + ServerInfo_ReservedEntry_DoNotUse(); + ServerInfo_ReservedEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const ServerInfo_ReservedEntry_DoNotUse& other); + static const ServerInfo_ReservedEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_ServerInfo_ReservedEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.proto.common.ServerInfo.ReservedEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "milvus.proto.common.ServerInfo.ReservedEntry.value"); + } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_common_2eproto); + return ::descriptor_table_common_2eproto.file_level_metadata[13]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class ServerInfo : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.common.ServerInfo) */ { + public: + ServerInfo(); + virtual ~ServerInfo(); + + ServerInfo(const ServerInfo& from); + ServerInfo(ServerInfo&& from) noexcept + : ServerInfo() { + *this = ::std::move(from); + } + + inline ServerInfo& operator=(const ServerInfo& from) { + CopyFrom(from); + return *this; + } + inline ServerInfo& operator=(ServerInfo&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const ServerInfo& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ServerInfo* internal_default_instance() { + return reinterpret_cast( + &_ServerInfo_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(ServerInfo& a, ServerInfo& b) { + a.Swap(&b); + } + inline void Swap(ServerInfo* other) { + if (other == this) return; + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline ServerInfo* New() const final { + return CreateMaybeMessage(nullptr); + } + + ServerInfo* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ServerInfo& from); + void MergeFrom(const ServerInfo& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ServerInfo* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "milvus.proto.common.ServerInfo"; + } + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return nullptr; + } + inline void* MaybeArenaPtr() const { + return nullptr; + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_common_2eproto); + return ::descriptor_table_common_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kReservedFieldNumber = 6, + kBuildTagsFieldNumber = 1, + kBuildTimeFieldNumber = 2, + kGitCommitFieldNumber = 3, + kGoVersionFieldNumber = 4, + kDeployModeFieldNumber = 5, + }; + // map reserved = 6; + int reserved_size() const; + void clear_reserved(); + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& + reserved() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* + mutable_reserved(); + + // string build_tags = 1; + void clear_build_tags(); + const std::string& build_tags() const; + void set_build_tags(const std::string& value); + void set_build_tags(std::string&& value); + void set_build_tags(const char* value); + void set_build_tags(const char* value, size_t size); + std::string* mutable_build_tags(); + std::string* release_build_tags(); + void set_allocated_build_tags(std::string* build_tags); + + // string build_time = 2; + void clear_build_time(); + const std::string& build_time() const; + void set_build_time(const std::string& value); + void set_build_time(std::string&& value); + void set_build_time(const char* value); + void set_build_time(const char* value, size_t size); + std::string* mutable_build_time(); + std::string* release_build_time(); + void set_allocated_build_time(std::string* build_time); + + // string git_commit = 3; + void clear_git_commit(); + const std::string& git_commit() const; + void set_git_commit(const std::string& value); + void set_git_commit(std::string&& value); + void set_git_commit(const char* value); + void set_git_commit(const char* value, size_t size); + std::string* mutable_git_commit(); + std::string* release_git_commit(); + void set_allocated_git_commit(std::string* git_commit); + + // string go_version = 4; + void clear_go_version(); + const std::string& go_version() const; + void set_go_version(const std::string& value); + void set_go_version(std::string&& value); + void set_go_version(const char* value); + void set_go_version(const char* value, size_t size); + std::string* mutable_go_version(); + std::string* release_go_version(); + void set_allocated_go_version(std::string* go_version); + + // string deploy_mode = 5; + void clear_deploy_mode(); + const std::string& deploy_mode() const; + void set_deploy_mode(const std::string& value); + void set_deploy_mode(std::string&& value); + void set_deploy_mode(const char* value); + void set_deploy_mode(const char* value, size_t size); + std::string* mutable_deploy_mode(); + std::string* release_deploy_mode(); + void set_allocated_deploy_mode(std::string* deploy_mode); + + // @@protoc_insertion_point(class_scope:milvus.proto.common.ServerInfo) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + ServerInfo_ReservedEntry_DoNotUse, + std::string, std::string, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + 0 > reserved_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr build_tags_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr build_time_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr git_commit_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr go_version_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr deploy_mode_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_common_2eproto; +}; // =================================================================== static const int kPrivilegeExtObjFieldNumber = 1001; @@ -3140,6 +3639,564 @@ inline void PrivilegeExt::set_object_name_indexs(::PROTOBUF_NAMESPACE_ID::int32 // @@protoc_insertion_point(field_set:milvus.proto.common.PrivilegeExt.object_name_indexs) } +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ClientInfo + +// string sdk_type = 1; +inline void ClientInfo::clear_sdk_type() { + sdk_type_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ClientInfo::sdk_type() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ClientInfo.sdk_type) + return sdk_type_.GetNoArena(); +} +inline void ClientInfo::set_sdk_type(const std::string& value) { + + sdk_type_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ClientInfo.sdk_type) +} +inline void ClientInfo::set_sdk_type(std::string&& value) { + + sdk_type_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ClientInfo.sdk_type) +} +inline void ClientInfo::set_sdk_type(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + sdk_type_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ClientInfo.sdk_type) +} +inline void ClientInfo::set_sdk_type(const char* value, size_t size) { + + sdk_type_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ClientInfo.sdk_type) +} +inline std::string* ClientInfo::mutable_sdk_type() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ClientInfo.sdk_type) + return sdk_type_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ClientInfo::release_sdk_type() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ClientInfo.sdk_type) + + return sdk_type_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ClientInfo::set_allocated_sdk_type(std::string* sdk_type) { + if (sdk_type != nullptr) { + + } else { + + } + sdk_type_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sdk_type); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ClientInfo.sdk_type) +} + +// string sdk_version = 2; +inline void ClientInfo::clear_sdk_version() { + sdk_version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ClientInfo::sdk_version() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ClientInfo.sdk_version) + return sdk_version_.GetNoArena(); +} +inline void ClientInfo::set_sdk_version(const std::string& value) { + + sdk_version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ClientInfo.sdk_version) +} +inline void ClientInfo::set_sdk_version(std::string&& value) { + + sdk_version_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ClientInfo.sdk_version) +} +inline void ClientInfo::set_sdk_version(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + sdk_version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ClientInfo.sdk_version) +} +inline void ClientInfo::set_sdk_version(const char* value, size_t size) { + + sdk_version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ClientInfo.sdk_version) +} +inline std::string* ClientInfo::mutable_sdk_version() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ClientInfo.sdk_version) + return sdk_version_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ClientInfo::release_sdk_version() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ClientInfo.sdk_version) + + return sdk_version_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ClientInfo::set_allocated_sdk_version(std::string* sdk_version) { + if (sdk_version != nullptr) { + + } else { + + } + sdk_version_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sdk_version); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ClientInfo.sdk_version) +} + +// string local_time = 3; +inline void ClientInfo::clear_local_time() { + local_time_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ClientInfo::local_time() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ClientInfo.local_time) + return local_time_.GetNoArena(); +} +inline void ClientInfo::set_local_time(const std::string& value) { + + local_time_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ClientInfo.local_time) +} +inline void ClientInfo::set_local_time(std::string&& value) { + + local_time_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ClientInfo.local_time) +} +inline void ClientInfo::set_local_time(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + local_time_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ClientInfo.local_time) +} +inline void ClientInfo::set_local_time(const char* value, size_t size) { + + local_time_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ClientInfo.local_time) +} +inline std::string* ClientInfo::mutable_local_time() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ClientInfo.local_time) + return local_time_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ClientInfo::release_local_time() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ClientInfo.local_time) + + return local_time_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ClientInfo::set_allocated_local_time(std::string* local_time) { + if (local_time != nullptr) { + + } else { + + } + local_time_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), local_time); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ClientInfo.local_time) +} + +// string user = 4; +inline void ClientInfo::clear_user() { + user_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ClientInfo::user() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ClientInfo.user) + return user_.GetNoArena(); +} +inline void ClientInfo::set_user(const std::string& value) { + + user_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ClientInfo.user) +} +inline void ClientInfo::set_user(std::string&& value) { + + user_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ClientInfo.user) +} +inline void ClientInfo::set_user(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + user_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ClientInfo.user) +} +inline void ClientInfo::set_user(const char* value, size_t size) { + + user_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ClientInfo.user) +} +inline std::string* ClientInfo::mutable_user() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ClientInfo.user) + return user_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ClientInfo::release_user() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ClientInfo.user) + + return user_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ClientInfo::set_allocated_user(std::string* user) { + if (user != nullptr) { + + } else { + + } + user_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), user); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ClientInfo.user) +} + +// string host = 5; +inline void ClientInfo::clear_host() { + host_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ClientInfo::host() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ClientInfo.host) + return host_.GetNoArena(); +} +inline void ClientInfo::set_host(const std::string& value) { + + host_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ClientInfo.host) +} +inline void ClientInfo::set_host(std::string&& value) { + + host_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ClientInfo.host) +} +inline void ClientInfo::set_host(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + host_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ClientInfo.host) +} +inline void ClientInfo::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ClientInfo.host) +} +inline std::string* ClientInfo::mutable_host() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ClientInfo.host) + return host_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ClientInfo::release_host() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ClientInfo.host) + + return host_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ClientInfo::set_allocated_host(std::string* host) { + if (host != nullptr) { + + } else { + + } + host_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ClientInfo.host) +} + +// map reserved = 6; +inline int ClientInfo::reserved_size() const { + return reserved_.size(); +} +inline void ClientInfo::clear_reserved() { + reserved_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +ClientInfo::reserved() const { + // @@protoc_insertion_point(field_map:milvus.proto.common.ClientInfo.reserved) + return reserved_.GetMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +ClientInfo::mutable_reserved() { + // @@protoc_insertion_point(field_mutable_map:milvus.proto.common.ClientInfo.reserved) + return reserved_.MutableMap(); +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ServerInfo + +// string build_tags = 1; +inline void ServerInfo::clear_build_tags() { + build_tags_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ServerInfo::build_tags() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ServerInfo.build_tags) + return build_tags_.GetNoArena(); +} +inline void ServerInfo::set_build_tags(const std::string& value) { + + build_tags_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ServerInfo.build_tags) +} +inline void ServerInfo::set_build_tags(std::string&& value) { + + build_tags_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ServerInfo.build_tags) +} +inline void ServerInfo::set_build_tags(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + build_tags_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ServerInfo.build_tags) +} +inline void ServerInfo::set_build_tags(const char* value, size_t size) { + + build_tags_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ServerInfo.build_tags) +} +inline std::string* ServerInfo::mutable_build_tags() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ServerInfo.build_tags) + return build_tags_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ServerInfo::release_build_tags() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ServerInfo.build_tags) + + return build_tags_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerInfo::set_allocated_build_tags(std::string* build_tags) { + if (build_tags != nullptr) { + + } else { + + } + build_tags_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), build_tags); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ServerInfo.build_tags) +} + +// string build_time = 2; +inline void ServerInfo::clear_build_time() { + build_time_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ServerInfo::build_time() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ServerInfo.build_time) + return build_time_.GetNoArena(); +} +inline void ServerInfo::set_build_time(const std::string& value) { + + build_time_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ServerInfo.build_time) +} +inline void ServerInfo::set_build_time(std::string&& value) { + + build_time_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ServerInfo.build_time) +} +inline void ServerInfo::set_build_time(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + build_time_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ServerInfo.build_time) +} +inline void ServerInfo::set_build_time(const char* value, size_t size) { + + build_time_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ServerInfo.build_time) +} +inline std::string* ServerInfo::mutable_build_time() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ServerInfo.build_time) + return build_time_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ServerInfo::release_build_time() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ServerInfo.build_time) + + return build_time_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerInfo::set_allocated_build_time(std::string* build_time) { + if (build_time != nullptr) { + + } else { + + } + build_time_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), build_time); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ServerInfo.build_time) +} + +// string git_commit = 3; +inline void ServerInfo::clear_git_commit() { + git_commit_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ServerInfo::git_commit() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ServerInfo.git_commit) + return git_commit_.GetNoArena(); +} +inline void ServerInfo::set_git_commit(const std::string& value) { + + git_commit_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ServerInfo.git_commit) +} +inline void ServerInfo::set_git_commit(std::string&& value) { + + git_commit_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ServerInfo.git_commit) +} +inline void ServerInfo::set_git_commit(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + git_commit_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ServerInfo.git_commit) +} +inline void ServerInfo::set_git_commit(const char* value, size_t size) { + + git_commit_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ServerInfo.git_commit) +} +inline std::string* ServerInfo::mutable_git_commit() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ServerInfo.git_commit) + return git_commit_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ServerInfo::release_git_commit() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ServerInfo.git_commit) + + return git_commit_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerInfo::set_allocated_git_commit(std::string* git_commit) { + if (git_commit != nullptr) { + + } else { + + } + git_commit_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), git_commit); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ServerInfo.git_commit) +} + +// string go_version = 4; +inline void ServerInfo::clear_go_version() { + go_version_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ServerInfo::go_version() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ServerInfo.go_version) + return go_version_.GetNoArena(); +} +inline void ServerInfo::set_go_version(const std::string& value) { + + go_version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ServerInfo.go_version) +} +inline void ServerInfo::set_go_version(std::string&& value) { + + go_version_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ServerInfo.go_version) +} +inline void ServerInfo::set_go_version(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + go_version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ServerInfo.go_version) +} +inline void ServerInfo::set_go_version(const char* value, size_t size) { + + go_version_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ServerInfo.go_version) +} +inline std::string* ServerInfo::mutable_go_version() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ServerInfo.go_version) + return go_version_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ServerInfo::release_go_version() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ServerInfo.go_version) + + return go_version_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerInfo::set_allocated_go_version(std::string* go_version) { + if (go_version != nullptr) { + + } else { + + } + go_version_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), go_version); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ServerInfo.go_version) +} + +// string deploy_mode = 5; +inline void ServerInfo::clear_deploy_mode() { + deploy_mode_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline const std::string& ServerInfo::deploy_mode() const { + // @@protoc_insertion_point(field_get:milvus.proto.common.ServerInfo.deploy_mode) + return deploy_mode_.GetNoArena(); +} +inline void ServerInfo::set_deploy_mode(const std::string& value) { + + deploy_mode_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:milvus.proto.common.ServerInfo.deploy_mode) +} +inline void ServerInfo::set_deploy_mode(std::string&& value) { + + deploy_mode_.SetNoArena( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:milvus.proto.common.ServerInfo.deploy_mode) +} +inline void ServerInfo::set_deploy_mode(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + deploy_mode_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:milvus.proto.common.ServerInfo.deploy_mode) +} +inline void ServerInfo::set_deploy_mode(const char* value, size_t size) { + + deploy_mode_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:milvus.proto.common.ServerInfo.deploy_mode) +} +inline std::string* ServerInfo::mutable_deploy_mode() { + + // @@protoc_insertion_point(field_mutable:milvus.proto.common.ServerInfo.deploy_mode) + return deploy_mode_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline std::string* ServerInfo::release_deploy_mode() { + // @@protoc_insertion_point(field_release:milvus.proto.common.ServerInfo.deploy_mode) + + return deploy_mode_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerInfo::set_allocated_deploy_mode(std::string* deploy_mode) { + if (deploy_mode != nullptr) { + + } else { + + } + deploy_mode_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), deploy_mode); + // @@protoc_insertion_point(field_set_allocated:milvus.proto.common.ServerInfo.deploy_mode) +} + +// map reserved = 6; +inline int ServerInfo::reserved_size() const { + return reserved_.size(); +} +inline void ServerInfo::clear_reserved() { + reserved_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& +ServerInfo::reserved() const { + // @@protoc_insertion_point(field_map:milvus.proto.common.ServerInfo.reserved) + return reserved_.GetMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* +ServerInfo::mutable_reserved() { + // @@protoc_insertion_point(field_mutable_map:milvus.proto.common.ServerInfo.reserved) + return reserved_.MutableMap(); +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -3163,6 +4220,14 @@ inline void PrivilegeExt::set_object_name_indexs(::PROTOBUF_NAMESPACE_ID::int32 // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/internal/core/src/pb/schema.pb.cc b/internal/core/src/pb/schema.pb.cc index d0c19cceb9..a370180276 100644 --- a/internal/core/src/pb/schema.pb.cc +++ b/internal/core/src/pb/schema.pb.cc @@ -509,6 +509,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_schema_2eproto::offsets[] PROT offsetof(::milvus::proto::schema::FieldDataDefaultTypeInternal, scalars_), offsetof(::milvus::proto::schema::FieldDataDefaultTypeInternal, vectors_), PROTOBUF_FIELD_OFFSET(::milvus::proto::schema::FieldData, field_id_), + PROTOBUF_FIELD_OFFSET(::milvus::proto::schema::FieldData, is_dynamic_), PROTOBUF_FIELD_OFFSET(::milvus::proto::schema::FieldData, field_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::milvus::proto::schema::IDs, _internal_metadata_), @@ -546,8 +547,8 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB { 96, -1, sizeof(::milvus::proto::schema::ScalarField)}, { 111, -1, sizeof(::milvus::proto::schema::VectorField)}, { 120, -1, sizeof(::milvus::proto::schema::FieldData)}, - { 131, -1, sizeof(::milvus::proto::schema::IDs)}, - { 139, -1, sizeof(::milvus::proto::schema::SearchResultData)}, + { 132, -1, sizeof(::milvus::proto::schema::IDs)}, + { 140, -1, sizeof(::milvus::proto::schema::SearchResultData)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { @@ -616,29 +617,30 @@ const char descriptor_table_protodef_schema_2eproto[] PROTOBUF_SECTION_VARIABLE( "JSONArrayH\000B\006\n\004data\"t\n\013VectorField\022\013\n\003di" "m\030\001 \001(\003\0227\n\014float_vector\030\002 \001(\0132\037.milvus.p" "roto.schema.FloatArrayH\000\022\027\n\rbinary_vecto" - "r\030\003 \001(\014H\000B\006\n\004data\"\321\001\n\tFieldData\022+\n\004type\030" + "r\030\003 \001(\014H\000B\006\n\004data\"\345\001\n\tFieldData\022+\n\004type\030" "\001 \001(\0162\035.milvus.proto.schema.DataType\022\022\n\n" "field_name\030\002 \001(\t\0223\n\007scalars\030\003 \001(\0132 .milv" "us.proto.schema.ScalarFieldH\000\0223\n\007vectors" "\030\004 \001(\0132 .milvus.proto.schema.VectorField" - "H\000\022\020\n\010field_id\030\005 \001(\003B\007\n\005field\"w\n\003IDs\0220\n\006" - "int_id\030\001 \001(\0132\036.milvus.proto.schema.LongA" - "rrayH\000\0222\n\006str_id\030\002 \001(\0132 .milvus.proto.sc" - "hema.StringArrayH\000B\n\n\010id_field\"\261\001\n\020Searc" - "hResultData\022\023\n\013num_queries\030\001 \001(\003\022\r\n\005top_" - "k\030\002 \001(\003\0223\n\013fields_data\030\003 \003(\0132\036.milvus.pr" - "oto.schema.FieldData\022\016\n\006scores\030\004 \003(\002\022%\n\003" - "ids\030\005 \001(\0132\030.milvus.proto.schema.IDs\022\r\n\005t" - "opks\030\006 \003(\003*\261\001\n\010DataType\022\010\n\004None\020\000\022\010\n\004Boo" - "l\020\001\022\010\n\004Int8\020\002\022\t\n\005Int16\020\003\022\t\n\005Int32\020\004\022\t\n\005I" - "nt64\020\005\022\t\n\005Float\020\n\022\n\n\006Double\020\013\022\n\n\006String\020" - "\024\022\013\n\007VarChar\020\025\022\t\n\005Array\020\026\022\010\n\004JSON\020\027\022\020\n\014B" - "inaryVector\020d\022\017\n\013FloatVector\020e*V\n\nFieldS" - "tate\022\020\n\014FieldCreated\020\000\022\021\n\rFieldCreating\020" - "\001\022\021\n\rFieldDropping\020\002\022\020\n\014FieldDropped\020\003Bf" - "\n\016io.milvus.grpcB\013SchemaProtoP\001Z1github." - "com/milvus-io/milvus-proto/go-api/schema" - "pb\240\001\001\252\002\016IO.Milvus.Grpcb\006proto3" + "H\000\022\020\n\010field_id\030\005 \001(\003\022\022\n\nis_dynamic\030\006 \001(\010" + "B\007\n\005field\"w\n\003IDs\0220\n\006int_id\030\001 \001(\0132\036.milvu" + "s.proto.schema.LongArrayH\000\0222\n\006str_id\030\002 \001" + "(\0132 .milvus.proto.schema.StringArrayH\000B\n" + "\n\010id_field\"\261\001\n\020SearchResultData\022\023\n\013num_q" + "ueries\030\001 \001(\003\022\r\n\005top_k\030\002 \001(\003\0223\n\013fields_da" + "ta\030\003 \003(\0132\036.milvus.proto.schema.FieldData" + "\022\016\n\006scores\030\004 \003(\002\022%\n\003ids\030\005 \001(\0132\030.milvus.p" + "roto.schema.IDs\022\r\n\005topks\030\006 \003(\003*\261\001\n\010DataT" + "ype\022\010\n\004None\020\000\022\010\n\004Bool\020\001\022\010\n\004Int8\020\002\022\t\n\005Int" + "16\020\003\022\t\n\005Int32\020\004\022\t\n\005Int64\020\005\022\t\n\005Float\020\n\022\n\n" + "\006Double\020\013\022\n\n\006String\020\024\022\013\n\007VarChar\020\025\022\t\n\005Ar" + "ray\020\026\022\010\n\004JSON\020\027\022\020\n\014BinaryVector\020d\022\017\n\013Flo" + "atVector\020e*V\n\nFieldState\022\020\n\014FieldCreated" + "\020\000\022\021\n\rFieldCreating\020\001\022\021\n\rFieldDropping\020\002" + "\022\020\n\014FieldDropped\020\003Bf\n\016io.milvus.grpcB\013Sc" + "hemaProtoP\001Z1github.com/milvus-io/milvus" + "-proto/go-api/schemapb\240\001\001\252\002\016IO.Milvus.Gr" + "pcb\006proto3" ; static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_schema_2eproto_deps[1] = { &::descriptor_table_common_2eproto, @@ -664,7 +666,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_sch static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_schema_2eproto_once; static bool descriptor_table_schema_2eproto_initialized = false; const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_schema_2eproto = { - &descriptor_table_schema_2eproto_initialized, descriptor_table_protodef_schema_2eproto, "schema.proto", 2710, + &descriptor_table_schema_2eproto_initialized, descriptor_table_protodef_schema_2eproto, "schema.proto", 2730, &descriptor_table_schema_2eproto_once, descriptor_table_schema_2eproto_sccs, descriptor_table_schema_2eproto_deps, 16, 1, schemas, file_default_instances, TableStruct_schema_2eproto::offsets, file_level_metadata_schema_2eproto, 17, file_level_enum_descriptors_schema_2eproto, file_level_service_descriptors_schema_2eproto, @@ -6562,6 +6564,13 @@ const char* FieldData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: CHK_(ptr); } else goto handle_unusual; continue; + // bool is_dynamic = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + is_dynamic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { @@ -6656,6 +6665,19 @@ bool FieldData::MergePartialFromCodedStream( break; } + // bool is_dynamic = 6; + case 6: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { + + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( + input, &is_dynamic_))); + } else { + goto handle_unusual; + } + break; + } + default: { handle_unusual: if (tag == 0) { @@ -6716,6 +6738,11 @@ void FieldData::SerializeWithCachedSizes( ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->field_id(), output); } + // bool is_dynamic = 6; + if (this->is_dynamic() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(6, this->is_dynamic(), output); + } + if (_internal_metadata_.have_unknown_fields()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( _internal_metadata_.unknown_fields(), output); @@ -6765,6 +6792,11 @@ void FieldData::SerializeWithCachedSizes( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->field_id(), target); } + // bool is_dynamic = 6; + if (this->is_dynamic() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->is_dynamic(), target); + } + if (_internal_metadata_.have_unknown_fields()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target); @@ -6799,6 +6831,11 @@ size_t FieldData::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->type()); } + // bool is_dynamic = 6; + if (this->is_dynamic() != 0) { + total_size += 1 + 1; + } + // int64 field_id = 5; if (this->field_id() != 0) { total_size += 1 + @@ -6859,6 +6896,9 @@ void FieldData::MergeFrom(const FieldData& from) { if (from.type() != 0) { set_type(from.type()); } + if (from.is_dynamic() != 0) { + set_is_dynamic(from.is_dynamic()); + } if (from.field_id() != 0) { set_field_id(from.field_id()); } @@ -6901,6 +6941,7 @@ void FieldData::InternalSwap(FieldData* other) { field_name_.Swap(&other->field_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(type_, other->type_); + swap(is_dynamic_, other->is_dynamic_); swap(field_id_, other->field_id_); swap(field_, other->field_); swap(_oneof_case_[0], other->_oneof_case_[0]); diff --git a/internal/core/src/pb/schema.pb.h b/internal/core/src/pb/schema.pb.h index 7f09aa7db8..f4a70953ce 100644 --- a/internal/core/src/pb/schema.pb.h +++ b/internal/core/src/pb/schema.pb.h @@ -2660,6 +2660,7 @@ class FieldData : enum : int { kFieldNameFieldNumber = 2, kTypeFieldNumber = 1, + kIsDynamicFieldNumber = 6, kFieldIdFieldNumber = 5, kScalarsFieldNumber = 3, kVectorsFieldNumber = 4, @@ -2680,6 +2681,11 @@ class FieldData : ::milvus::proto::schema::DataType type() const; void set_type(::milvus::proto::schema::DataType value); + // bool is_dynamic = 6; + void clear_is_dynamic(); + bool is_dynamic() const; + void set_is_dynamic(bool value); + // int64 field_id = 5; void clear_field_id(); ::PROTOBUF_NAMESPACE_ID::int64 field_id() const; @@ -2715,6 +2721,7 @@ class FieldData : ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr field_name_; int type_; + bool is_dynamic_; ::PROTOBUF_NAMESPACE_ID::int64 field_id_; union FieldUnion { FieldUnion() {} @@ -5039,6 +5046,20 @@ inline void FieldData::set_field_id(::PROTOBUF_NAMESPACE_ID::int64 value) { // @@protoc_insertion_point(field_set:milvus.proto.schema.FieldData.field_id) } +// bool is_dynamic = 6; +inline void FieldData::clear_is_dynamic() { + is_dynamic_ = false; +} +inline bool FieldData::is_dynamic() const { + // @@protoc_insertion_point(field_get:milvus.proto.schema.FieldData.is_dynamic) + return is_dynamic_; +} +inline void FieldData::set_is_dynamic(bool value) { + + is_dynamic_ = value; + // @@protoc_insertion_point(field_set:milvus.proto.schema.FieldData.is_dynamic) +} + inline bool FieldData::has_field() const { return field_case() != FIELD_NOT_SET; } diff --git a/internal/distributed/proxy/client/client.go b/internal/distributed/proxy/client/client.go index d86f0ba80c..26f7852294 100644 --- a/internal/distributed/proxy/client/client.go +++ b/internal/distributed/proxy/client/client.go @@ -236,3 +236,21 @@ func (c *Client) SetRates(ctx context.Context, req *proxypb.SetRatesRequest) (*c } return ret.(*commonpb.Status), err } + +func (c *Client) ListClientInfos(ctx context.Context, req *proxypb.ListClientInfosRequest) (*proxypb.ListClientInfosResponse, error) { + req = typeutil.Clone(req) + commonpbutil.UpdateMsgBase( + req.GetBase(), + commonpbutil.FillMsgBaseFromClient(Params.ProxyCfg.GetNodeID(), commonpbutil.WithTargetID(c.grpcClient.GetNodeID())), + ) + ret, err := c.grpcClient.ReCall(ctx, func(client proxypb.ProxyClient) (any, error) { + if !funcutil.CheckCtxValid(ctx) { + return nil, ctx.Err() + } + return client.ListClientInfos(ctx, req) + }) + if err != nil { + return nil, err + } + return ret.(*proxypb.ListClientInfosResponse), nil +} diff --git a/internal/distributed/proxy/service.go b/internal/distributed/proxy/service.go index 5281c82a51..2fa7dbad1e 100644 --- a/internal/distributed/proxy/service.go +++ b/internal/distributed/proxy/service.go @@ -183,6 +183,7 @@ func (s *Server) startExternalGrpc(grpcPort int, errChan chan error) { proxy.UnaryServerInterceptor(proxy.PrivilegeInterceptor), logutil.UnaryTraceLoggerInterceptor, proxy.RateLimitInterceptor(limiter), + proxy.KeepActiveInterceptor, )), } @@ -943,3 +944,11 @@ func (s *Server) DropDatabase(ctx context.Context, request *milvuspb.DropDatabas func (s *Server) ListDatabases(ctx context.Context, request *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) { return s.proxy.ListDatabases(ctx, request) } + +func (s *Server) Connect(ctx context.Context, req *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) { + return s.proxy.Connect(ctx, req) +} + +func (s *Server) ListClientInfos(ctx context.Context, req *proxypb.ListClientInfosRequest) (*proxypb.ListClientInfosResponse, error) { + return s.proxy.ListClientInfos(ctx, req) +} diff --git a/internal/distributed/proxy/service_test.go b/internal/distributed/proxy/service_test.go index 35d28920bc..84e37b47e8 100644 --- a/internal/distributed/proxy/service_test.go +++ b/internal/distributed/proxy/service_test.go @@ -703,6 +703,10 @@ func (m *MockProxy) Register() error { return m.regErr } +func (m *MockProxy) ListClientInfos(ctx context.Context, request *proxypb.ListClientInfosRequest) (*proxypb.ListClientInfosResponse, error) { + return nil, nil +} + func (m *MockProxy) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) { return nil, nil } @@ -1038,6 +1042,10 @@ func (m *MockProxy) RenameCollection(ctx context.Context, req *milvuspb.RenameCo return nil, nil } +func (m *MockProxy) Connect(ctx context.Context, req *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) { + return nil, nil +} + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// type WaitOption struct { diff --git a/internal/mocks/mock_proxy.go b/internal/mocks/mock_proxy.go index 301b6561f6..6de8a58f6e 100644 --- a/internal/mocks/mock_proxy.go +++ b/internal/mocks/mock_proxy.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.21.1. DO NOT EDIT. +// Code generated by mockery v2.16.0. DO NOT EDIT. package mocks @@ -37,10 +37,6 @@ func (_m *Proxy) AlterAlias(ctx context.Context, request *milvuspb.AlterAliasReq ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterAliasRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -49,6 +45,7 @@ func (_m *Proxy) AlterAlias(ctx context.Context, request *milvuspb.AlterAliasReq } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.AlterAliasRequest) error); ok { r1 = rf(ctx, request) } else { @@ -64,8 +61,8 @@ type Proxy_AlterAlias_Call struct { } // AlterAlias is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.AlterAliasRequest +// - ctx context.Context +// - request *milvuspb.AlterAliasRequest func (_e *Proxy_Expecter) AlterAlias(ctx interface{}, request interface{}) *Proxy_AlterAlias_Call { return &Proxy_AlterAlias_Call{Call: _e.mock.On("AlterAlias", ctx, request)} } @@ -82,20 +79,11 @@ func (_c *Proxy_AlterAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_ return _c } -func (_c *Proxy_AlterAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterAliasRequest) (*commonpb.Status, error)) *Proxy_AlterAlias_Call { - _c.Call.Return(run) - return _c -} - // AlterCollection provides a mock function with given fields: ctx, request func (_m *Proxy) AlterCollection(ctx context.Context, request *milvuspb.AlterCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.AlterCollectionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -104,6 +92,7 @@ func (_m *Proxy) AlterCollection(ctx context.Context, request *milvuspb.AlterCol } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.AlterCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -119,8 +108,8 @@ type Proxy_AlterCollection_Call struct { } // AlterCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.AlterCollectionRequest +// - ctx context.Context +// - request *milvuspb.AlterCollectionRequest func (_e *Proxy_Expecter) AlterCollection(ctx interface{}, request interface{}) *Proxy_AlterCollection_Call { return &Proxy_AlterCollection_Call{Call: _e.mock.On("AlterCollection", ctx, request)} } @@ -137,20 +126,11 @@ func (_c *Proxy_AlterCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *P return _c } -func (_c *Proxy_AlterCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.AlterCollectionRequest) (*commonpb.Status, error)) *Proxy_AlterCollection_Call { - _c.Call.Return(run) - return _c -} - // CalcDistance provides a mock function with given fields: ctx, request func (_m *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.CalcDistanceResults - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CalcDistanceRequest) *milvuspb.CalcDistanceResults); ok { r0 = rf(ctx, request) } else { @@ -159,6 +139,7 @@ func (_m *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDistanc } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CalcDistanceRequest) error); ok { r1 = rf(ctx, request) } else { @@ -174,8 +155,8 @@ type Proxy_CalcDistance_Call struct { } // CalcDistance is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.CalcDistanceRequest +// - ctx context.Context +// - request *milvuspb.CalcDistanceRequest func (_e *Proxy_Expecter) CalcDistance(ctx interface{}, request interface{}) *Proxy_CalcDistance_Call { return &Proxy_CalcDistance_Call{Call: _e.mock.On("CalcDistance", ctx, request)} } @@ -192,20 +173,11 @@ func (_c *Proxy_CalcDistance_Call) Return(_a0 *milvuspb.CalcDistanceResults, _a1 return _c } -func (_c *Proxy_CalcDistance_Call) RunAndReturn(run func(context.Context, *milvuspb.CalcDistanceRequest) (*milvuspb.CalcDistanceResults, error)) *Proxy_CalcDistance_Call { - _c.Call.Return(run) - return _c -} - // CheckHealth provides a mock function with given fields: ctx, req func (_m *Proxy) CheckHealth(ctx context.Context, req *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.CheckHealthResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CheckHealthRequest) *milvuspb.CheckHealthResponse); ok { r0 = rf(ctx, req) } else { @@ -214,6 +186,7 @@ func (_m *Proxy) CheckHealth(ctx context.Context, req *milvuspb.CheckHealthReque } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CheckHealthRequest) error); ok { r1 = rf(ctx, req) } else { @@ -229,8 +202,8 @@ type Proxy_CheckHealth_Call struct { } // CheckHealth is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.CheckHealthRequest +// - ctx context.Context +// - req *milvuspb.CheckHealthRequest func (_e *Proxy_Expecter) CheckHealth(ctx interface{}, req interface{}) *Proxy_CheckHealth_Call { return &Proxy_CheckHealth_Call{Call: _e.mock.On("CheckHealth", ctx, req)} } @@ -247,8 +220,50 @@ func (_c *Proxy_CheckHealth_Call) Return(_a0 *milvuspb.CheckHealthResponse, _a1 return _c } -func (_c *Proxy_CheckHealth_Call) RunAndReturn(run func(context.Context, *milvuspb.CheckHealthRequest) (*milvuspb.CheckHealthResponse, error)) *Proxy_CheckHealth_Call { - _c.Call.Return(run) +// Connect provides a mock function with given fields: ctx, req +func (_m *Proxy) Connect(ctx context.Context, req *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) { + ret := _m.Called(ctx, req) + + var r0 *milvuspb.ConnectResponse + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ConnectRequest) *milvuspb.ConnectResponse); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*milvuspb.ConnectResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ConnectRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Proxy_Connect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connect' +type Proxy_Connect_Call struct { + *mock.Call +} + +// Connect is a helper method to define mock.On call +// - ctx context.Context +// - req *milvuspb.ConnectRequest +func (_e *Proxy_Expecter) Connect(ctx interface{}, req interface{}) *Proxy_Connect_Call { + return &Proxy_Connect_Call{Call: _e.mock.On("Connect", ctx, req)} +} + +func (_c *Proxy_Connect_Call) Run(run func(ctx context.Context, req *milvuspb.ConnectRequest)) *Proxy_Connect_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.ConnectRequest)) + }) + return _c +} + +func (_c *Proxy_Connect_Call) Return(_a0 *milvuspb.ConnectResponse, _a1 error) *Proxy_Connect_Call { + _c.Call.Return(_a0, _a1) return _c } @@ -257,10 +272,6 @@ func (_m *Proxy) CreateAlias(ctx context.Context, request *milvuspb.CreateAliasR ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateAliasRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -269,6 +280,7 @@ func (_m *Proxy) CreateAlias(ctx context.Context, request *milvuspb.CreateAliasR } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateAliasRequest) error); ok { r1 = rf(ctx, request) } else { @@ -284,8 +296,8 @@ type Proxy_CreateAlias_Call struct { } // CreateAlias is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.CreateAliasRequest +// - ctx context.Context +// - request *milvuspb.CreateAliasRequest func (_e *Proxy_Expecter) CreateAlias(ctx interface{}, request interface{}) *Proxy_CreateAlias_Call { return &Proxy_CreateAlias_Call{Call: _e.mock.On("CreateAlias", ctx, request)} } @@ -302,20 +314,11 @@ func (_c *Proxy_CreateAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy return _c } -func (_c *Proxy_CreateAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateAliasRequest) (*commonpb.Status, error)) *Proxy_CreateAlias_Call { - _c.Call.Return(run) - return _c -} - // CreateCollection provides a mock function with given fields: ctx, request func (_m *Proxy) CreateCollection(ctx context.Context, request *milvuspb.CreateCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCollectionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -324,6 +327,7 @@ func (_m *Proxy) CreateCollection(ctx context.Context, request *milvuspb.CreateC } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -339,8 +343,8 @@ type Proxy_CreateCollection_Call struct { } // CreateCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.CreateCollectionRequest +// - ctx context.Context +// - request *milvuspb.CreateCollectionRequest func (_e *Proxy_Expecter) CreateCollection(ctx interface{}, request interface{}) *Proxy_CreateCollection_Call { return &Proxy_CreateCollection_Call{Call: _e.mock.On("CreateCollection", ctx, request)} } @@ -357,20 +361,11 @@ func (_c *Proxy_CreateCollection_Call) Return(_a0 *commonpb.Status, _a1 error) * return _c } -func (_c *Proxy_CreateCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateCollectionRequest) (*commonpb.Status, error)) *Proxy_CreateCollection_Call { - _c.Call.Return(run) - return _c -} - // CreateCredential provides a mock function with given fields: ctx, req func (_m *Proxy) CreateCredential(ctx context.Context, req *milvuspb.CreateCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCredentialRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateCredentialRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -379,6 +374,7 @@ func (_m *Proxy) CreateCredential(ctx context.Context, req *milvuspb.CreateCrede } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateCredentialRequest) error); ok { r1 = rf(ctx, req) } else { @@ -394,8 +390,8 @@ type Proxy_CreateCredential_Call struct { } // CreateCredential is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.CreateCredentialRequest +// - ctx context.Context +// - req *milvuspb.CreateCredentialRequest func (_e *Proxy_Expecter) CreateCredential(ctx interface{}, req interface{}) *Proxy_CreateCredential_Call { return &Proxy_CreateCredential_Call{Call: _e.mock.On("CreateCredential", ctx, req)} } @@ -412,8 +408,50 @@ func (_c *Proxy_CreateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) * return _c } -func (_c *Proxy_CreateCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateCredentialRequest) (*commonpb.Status, error)) *Proxy_CreateCredential_Call { - _c.Call.Return(run) +// CreateDatabase provides a mock function with given fields: ctx, req +func (_m *Proxy) CreateDatabase(ctx context.Context, req *milvuspb.CreateDatabaseRequest) (*commonpb.Status, error) { + ret := _m.Called(ctx, req) + + var r0 *commonpb.Status + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateDatabaseRequest) *commonpb.Status); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*commonpb.Status) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateDatabaseRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Proxy_CreateDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDatabase' +type Proxy_CreateDatabase_Call struct { + *mock.Call +} + +// CreateDatabase is a helper method to define mock.On call +// - ctx context.Context +// - req *milvuspb.CreateDatabaseRequest +func (_e *Proxy_Expecter) CreateDatabase(ctx interface{}, req interface{}) *Proxy_CreateDatabase_Call { + return &Proxy_CreateDatabase_Call{Call: _e.mock.On("CreateDatabase", ctx, req)} +} + +func (_c *Proxy_CreateDatabase_Call) Run(run func(ctx context.Context, req *milvuspb.CreateDatabaseRequest)) *Proxy_CreateDatabase_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.CreateDatabaseRequest)) + }) + return _c +} + +func (_c *Proxy_CreateDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_CreateDatabase_Call { + _c.Call.Return(_a0, _a1) return _c } @@ -422,10 +460,6 @@ func (_m *Proxy) CreateIndex(ctx context.Context, request *milvuspb.CreateIndexR ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateIndexRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -434,6 +468,7 @@ func (_m *Proxy) CreateIndex(ctx context.Context, request *milvuspb.CreateIndexR } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateIndexRequest) error); ok { r1 = rf(ctx, request) } else { @@ -449,8 +484,8 @@ type Proxy_CreateIndex_Call struct { } // CreateIndex is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.CreateIndexRequest +// - ctx context.Context +// - request *milvuspb.CreateIndexRequest func (_e *Proxy_Expecter) CreateIndex(ctx interface{}, request interface{}) *Proxy_CreateIndex_Call { return &Proxy_CreateIndex_Call{Call: _e.mock.On("CreateIndex", ctx, request)} } @@ -467,20 +502,11 @@ func (_c *Proxy_CreateIndex_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy return _c } -func (_c *Proxy_CreateIndex_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateIndexRequest) (*commonpb.Status, error)) *Proxy_CreateIndex_Call { - _c.Call.Return(run) - return _c -} - // CreatePartition provides a mock function with given fields: ctx, request func (_m *Proxy) CreatePartition(ctx context.Context, request *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreatePartitionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -489,6 +515,7 @@ func (_m *Proxy) CreatePartition(ctx context.Context, request *milvuspb.CreatePa } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreatePartitionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -504,8 +531,8 @@ type Proxy_CreatePartition_Call struct { } // CreatePartition is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.CreatePartitionRequest +// - ctx context.Context +// - request *milvuspb.CreatePartitionRequest func (_e *Proxy_Expecter) CreatePartition(ctx interface{}, request interface{}) *Proxy_CreatePartition_Call { return &Proxy_CreatePartition_Call{Call: _e.mock.On("CreatePartition", ctx, request)} } @@ -522,20 +549,11 @@ func (_c *Proxy_CreatePartition_Call) Return(_a0 *commonpb.Status, _a1 error) *P return _c } -func (_c *Proxy_CreatePartition_Call) RunAndReturn(run func(context.Context, *milvuspb.CreatePartitionRequest) (*commonpb.Status, error)) *Proxy_CreatePartition_Call { - _c.Call.Return(run) - return _c -} - // CreateResourceGroup provides a mock function with given fields: ctx, req func (_m *Proxy) CreateResourceGroup(ctx context.Context, req *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateResourceGroupRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -544,6 +562,7 @@ func (_m *Proxy) CreateResourceGroup(ctx context.Context, req *milvuspb.CreateRe } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateResourceGroupRequest) error); ok { r1 = rf(ctx, req) } else { @@ -559,8 +578,8 @@ type Proxy_CreateResourceGroup_Call struct { } // CreateResourceGroup is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.CreateResourceGroupRequest +// - ctx context.Context +// - req *milvuspb.CreateResourceGroupRequest func (_e *Proxy_Expecter) CreateResourceGroup(ctx interface{}, req interface{}) *Proxy_CreateResourceGroup_Call { return &Proxy_CreateResourceGroup_Call{Call: _e.mock.On("CreateResourceGroup", ctx, req)} } @@ -577,20 +596,11 @@ func (_c *Proxy_CreateResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error return _c } -func (_c *Proxy_CreateResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateResourceGroupRequest) (*commonpb.Status, error)) *Proxy_CreateResourceGroup_Call { - _c.Call.Return(run) - return _c -} - // CreateRole provides a mock function with given fields: ctx, req func (_m *Proxy) CreateRole(ctx context.Context, req *milvuspb.CreateRoleRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.CreateRoleRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -599,6 +609,7 @@ func (_m *Proxy) CreateRole(ctx context.Context, req *milvuspb.CreateRoleRequest } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.CreateRoleRequest) error); ok { r1 = rf(ctx, req) } else { @@ -614,8 +625,8 @@ type Proxy_CreateRole_Call struct { } // CreateRole is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.CreateRoleRequest +// - ctx context.Context +// - req *milvuspb.CreateRoleRequest func (_e *Proxy_Expecter) CreateRole(ctx interface{}, req interface{}) *Proxy_CreateRole_Call { return &Proxy_CreateRole_Call{Call: _e.mock.On("CreateRole", ctx, req)} } @@ -632,20 +643,11 @@ func (_c *Proxy_CreateRole_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_ return _c } -func (_c *Proxy_CreateRole_Call) RunAndReturn(run func(context.Context, *milvuspb.CreateRoleRequest) (*commonpb.Status, error)) *Proxy_CreateRole_Call { - _c.Call.Return(run) - return _c -} - // Delete provides a mock function with given fields: ctx, request func (_m *Proxy) Delete(ctx context.Context, request *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.MutationResult - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteRequest) *milvuspb.MutationResult); ok { r0 = rf(ctx, request) } else { @@ -654,6 +656,7 @@ func (_m *Proxy) Delete(ctx context.Context, request *milvuspb.DeleteRequest) (* } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DeleteRequest) error); ok { r1 = rf(ctx, request) } else { @@ -669,8 +672,8 @@ type Proxy_Delete_Call struct { } // Delete is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DeleteRequest +// - ctx context.Context +// - request *milvuspb.DeleteRequest func (_e *Proxy_Expecter) Delete(ctx interface{}, request interface{}) *Proxy_Delete_Call { return &Proxy_Delete_Call{Call: _e.mock.On("Delete", ctx, request)} } @@ -687,20 +690,11 @@ func (_c *Proxy_Delete_Call) Return(_a0 *milvuspb.MutationResult, _a1 error) *Pr return _c } -func (_c *Proxy_Delete_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteRequest) (*milvuspb.MutationResult, error)) *Proxy_Delete_Call { - _c.Call.Return(run) - return _c -} - // DeleteCredential provides a mock function with given fields: ctx, req func (_m *Proxy) DeleteCredential(ctx context.Context, req *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DeleteCredentialRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -709,6 +703,7 @@ func (_m *Proxy) DeleteCredential(ctx context.Context, req *milvuspb.DeleteCrede } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DeleteCredentialRequest) error); ok { r1 = rf(ctx, req) } else { @@ -724,8 +719,8 @@ type Proxy_DeleteCredential_Call struct { } // DeleteCredential is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.DeleteCredentialRequest +// - ctx context.Context +// - req *milvuspb.DeleteCredentialRequest func (_e *Proxy_Expecter) DeleteCredential(ctx interface{}, req interface{}) *Proxy_DeleteCredential_Call { return &Proxy_DeleteCredential_Call{Call: _e.mock.On("DeleteCredential", ctx, req)} } @@ -742,20 +737,11 @@ func (_c *Proxy_DeleteCredential_Call) Return(_a0 *commonpb.Status, _a1 error) * return _c } -func (_c *Proxy_DeleteCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.DeleteCredentialRequest) (*commonpb.Status, error)) *Proxy_DeleteCredential_Call { - _c.Call.Return(run) - return _c -} - // DescribeCollection provides a mock function with given fields: ctx, request func (_m *Proxy) DescribeCollection(ctx context.Context, request *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.DescribeCollectionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeCollectionRequest) *milvuspb.DescribeCollectionResponse); ok { r0 = rf(ctx, request) } else { @@ -764,6 +750,7 @@ func (_m *Proxy) DescribeCollection(ctx context.Context, request *milvuspb.Descr } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -779,8 +766,8 @@ type Proxy_DescribeCollection_Call struct { } // DescribeCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DescribeCollectionRequest +// - ctx context.Context +// - request *milvuspb.DescribeCollectionRequest func (_e *Proxy_Expecter) DescribeCollection(ctx interface{}, request interface{}) *Proxy_DescribeCollection_Call { return &Proxy_DescribeCollection_Call{Call: _e.mock.On("DescribeCollection", ctx, request)} } @@ -797,20 +784,11 @@ func (_c *Proxy_DescribeCollection_Call) Return(_a0 *milvuspb.DescribeCollection return _c } -func (_c *Proxy_DescribeCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeCollectionRequest) (*milvuspb.DescribeCollectionResponse, error)) *Proxy_DescribeCollection_Call { - _c.Call.Return(run) - return _c -} - // DescribeIndex provides a mock function with given fields: ctx, request func (_m *Proxy) DescribeIndex(ctx context.Context, request *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.DescribeIndexResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeIndexRequest) *milvuspb.DescribeIndexResponse); ok { r0 = rf(ctx, request) } else { @@ -819,6 +797,7 @@ func (_m *Proxy) DescribeIndex(ctx context.Context, request *milvuspb.DescribeIn } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeIndexRequest) error); ok { r1 = rf(ctx, request) } else { @@ -834,8 +813,8 @@ type Proxy_DescribeIndex_Call struct { } // DescribeIndex is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DescribeIndexRequest +// - ctx context.Context +// - request *milvuspb.DescribeIndexRequest func (_e *Proxy_Expecter) DescribeIndex(ctx interface{}, request interface{}) *Proxy_DescribeIndex_Call { return &Proxy_DescribeIndex_Call{Call: _e.mock.On("DescribeIndex", ctx, request)} } @@ -852,20 +831,11 @@ func (_c *Proxy_DescribeIndex_Call) Return(_a0 *milvuspb.DescribeIndexResponse, return _c } -func (_c *Proxy_DescribeIndex_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeIndexRequest) (*milvuspb.DescribeIndexResponse, error)) *Proxy_DescribeIndex_Call { - _c.Call.Return(run) - return _c -} - // DescribeResourceGroup provides a mock function with given fields: ctx, req func (_m *Proxy) DescribeResourceGroup(ctx context.Context, req *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.DescribeResourceGroupResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) *milvuspb.DescribeResourceGroupResponse); ok { r0 = rf(ctx, req) } else { @@ -874,6 +844,7 @@ func (_m *Proxy) DescribeResourceGroup(ctx context.Context, req *milvuspb.Descri } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DescribeResourceGroupRequest) error); ok { r1 = rf(ctx, req) } else { @@ -889,8 +860,8 @@ type Proxy_DescribeResourceGroup_Call struct { } // DescribeResourceGroup is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.DescribeResourceGroupRequest +// - ctx context.Context +// - req *milvuspb.DescribeResourceGroupRequest func (_e *Proxy_Expecter) DescribeResourceGroup(ctx interface{}, req interface{}) *Proxy_DescribeResourceGroup_Call { return &Proxy_DescribeResourceGroup_Call{Call: _e.mock.On("DescribeResourceGroup", ctx, req)} } @@ -907,20 +878,11 @@ func (_c *Proxy_DescribeResourceGroup_Call) Return(_a0 *milvuspb.DescribeResourc return _c } -func (_c *Proxy_DescribeResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error)) *Proxy_DescribeResourceGroup_Call { - _c.Call.Return(run) - return _c -} - // DropAlias provides a mock function with given fields: ctx, request func (_m *Proxy) DropAlias(ctx context.Context, request *milvuspb.DropAliasRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropAliasRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -929,6 +891,7 @@ func (_m *Proxy) DropAlias(ctx context.Context, request *milvuspb.DropAliasReque } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropAliasRequest) error); ok { r1 = rf(ctx, request) } else { @@ -944,8 +907,8 @@ type Proxy_DropAlias_Call struct { } // DropAlias is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DropAliasRequest +// - ctx context.Context +// - request *milvuspb.DropAliasRequest func (_e *Proxy_Expecter) DropAlias(ctx interface{}, request interface{}) *Proxy_DropAlias_Call { return &Proxy_DropAlias_Call{Call: _e.mock.On("DropAlias", ctx, request)} } @@ -962,20 +925,11 @@ func (_c *Proxy_DropAlias_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_D return _c } -func (_c *Proxy_DropAlias_Call) RunAndReturn(run func(context.Context, *milvuspb.DropAliasRequest) (*commonpb.Status, error)) *Proxy_DropAlias_Call { - _c.Call.Return(run) - return _c -} - // DropCollection provides a mock function with given fields: ctx, request func (_m *Proxy) DropCollection(ctx context.Context, request *milvuspb.DropCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropCollectionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -984,6 +938,7 @@ func (_m *Proxy) DropCollection(ctx context.Context, request *milvuspb.DropColle } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -999,8 +954,8 @@ type Proxy_DropCollection_Call struct { } // DropCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DropCollectionRequest +// - ctx context.Context +// - request *milvuspb.DropCollectionRequest func (_e *Proxy_Expecter) DropCollection(ctx interface{}, request interface{}) *Proxy_DropCollection_Call { return &Proxy_DropCollection_Call{Call: _e.mock.On("DropCollection", ctx, request)} } @@ -1017,8 +972,50 @@ func (_c *Proxy_DropCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *Pr return _c } -func (_c *Proxy_DropCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.DropCollectionRequest) (*commonpb.Status, error)) *Proxy_DropCollection_Call { - _c.Call.Return(run) +// DropDatabase provides a mock function with given fields: ctx, req +func (_m *Proxy) DropDatabase(ctx context.Context, req *milvuspb.DropDatabaseRequest) (*commonpb.Status, error) { + ret := _m.Called(ctx, req) + + var r0 *commonpb.Status + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropDatabaseRequest) *commonpb.Status); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*commonpb.Status) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropDatabaseRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Proxy_DropDatabase_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DropDatabase' +type Proxy_DropDatabase_Call struct { + *mock.Call +} + +// DropDatabase is a helper method to define mock.On call +// - ctx context.Context +// - req *milvuspb.DropDatabaseRequest +func (_e *Proxy_Expecter) DropDatabase(ctx interface{}, req interface{}) *Proxy_DropDatabase_Call { + return &Proxy_DropDatabase_Call{Call: _e.mock.On("DropDatabase", ctx, req)} +} + +func (_c *Proxy_DropDatabase_Call) Run(run func(ctx context.Context, req *milvuspb.DropDatabaseRequest)) *Proxy_DropDatabase_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.DropDatabaseRequest)) + }) + return _c +} + +func (_c *Proxy_DropDatabase_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_DropDatabase_Call { + _c.Call.Return(_a0, _a1) return _c } @@ -1027,10 +1024,6 @@ func (_m *Proxy) DropIndex(ctx context.Context, request *milvuspb.DropIndexReque ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropIndexRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropIndexRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -1039,6 +1032,7 @@ func (_m *Proxy) DropIndex(ctx context.Context, request *milvuspb.DropIndexReque } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropIndexRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1054,8 +1048,8 @@ type Proxy_DropIndex_Call struct { } // DropIndex is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DropIndexRequest +// - ctx context.Context +// - request *milvuspb.DropIndexRequest func (_e *Proxy_Expecter) DropIndex(ctx interface{}, request interface{}) *Proxy_DropIndex_Call { return &Proxy_DropIndex_Call{Call: _e.mock.On("DropIndex", ctx, request)} } @@ -1072,20 +1066,11 @@ func (_c *Proxy_DropIndex_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_D return _c } -func (_c *Proxy_DropIndex_Call) RunAndReturn(run func(context.Context, *milvuspb.DropIndexRequest) (*commonpb.Status, error)) *Proxy_DropIndex_Call { - _c.Call.Return(run) - return _c -} - // DropPartition provides a mock function with given fields: ctx, request func (_m *Proxy) DropPartition(ctx context.Context, request *milvuspb.DropPartitionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropPartitionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -1094,6 +1079,7 @@ func (_m *Proxy) DropPartition(ctx context.Context, request *milvuspb.DropPartit } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropPartitionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1109,8 +1095,8 @@ type Proxy_DropPartition_Call struct { } // DropPartition is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DropPartitionRequest +// - ctx context.Context +// - request *milvuspb.DropPartitionRequest func (_e *Proxy_Expecter) DropPartition(ctx interface{}, request interface{}) *Proxy_DropPartition_Call { return &Proxy_DropPartition_Call{Call: _e.mock.On("DropPartition", ctx, request)} } @@ -1127,20 +1113,11 @@ func (_c *Proxy_DropPartition_Call) Return(_a0 *commonpb.Status, _a1 error) *Pro return _c } -func (_c *Proxy_DropPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.DropPartitionRequest) (*commonpb.Status, error)) *Proxy_DropPartition_Call { - _c.Call.Return(run) - return _c -} - // DropResourceGroup provides a mock function with given fields: ctx, req func (_m *Proxy) DropResourceGroup(ctx context.Context, req *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropResourceGroupRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -1149,6 +1126,7 @@ func (_m *Proxy) DropResourceGroup(ctx context.Context, req *milvuspb.DropResour } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropResourceGroupRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1164,8 +1142,8 @@ type Proxy_DropResourceGroup_Call struct { } // DropResourceGroup is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.DropResourceGroupRequest +// - ctx context.Context +// - req *milvuspb.DropResourceGroupRequest func (_e *Proxy_Expecter) DropResourceGroup(ctx interface{}, req interface{}) *Proxy_DropResourceGroup_Call { return &Proxy_DropResourceGroup_Call{Call: _e.mock.On("DropResourceGroup", ctx, req)} } @@ -1182,20 +1160,11 @@ func (_c *Proxy_DropResourceGroup_Call) Return(_a0 *commonpb.Status, _a1 error) return _c } -func (_c *Proxy_DropResourceGroup_Call) RunAndReturn(run func(context.Context, *milvuspb.DropResourceGroupRequest) (*commonpb.Status, error)) *Proxy_DropResourceGroup_Call { - _c.Call.Return(run) - return _c -} - // DropRole provides a mock function with given fields: ctx, req func (_m *Proxy) DropRole(ctx context.Context, req *milvuspb.DropRoleRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DropRoleRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -1204,6 +1173,7 @@ func (_m *Proxy) DropRole(ctx context.Context, req *milvuspb.DropRoleRequest) (* } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DropRoleRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1219,8 +1189,8 @@ type Proxy_DropRole_Call struct { } // DropRole is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.DropRoleRequest +// - ctx context.Context +// - req *milvuspb.DropRoleRequest func (_e *Proxy_Expecter) DropRole(ctx interface{}, req interface{}) *Proxy_DropRole_Call { return &Proxy_DropRole_Call{Call: _e.mock.On("DropRole", ctx, req)} } @@ -1237,20 +1207,11 @@ func (_c *Proxy_DropRole_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_Dr return _c } -func (_c *Proxy_DropRole_Call) RunAndReturn(run func(context.Context, *milvuspb.DropRoleRequest) (*commonpb.Status, error)) *Proxy_DropRole_Call { - _c.Call.Return(run) - return _c -} - // Dummy provides a mock function with given fields: ctx, request func (_m *Proxy) Dummy(ctx context.Context, request *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.DummyResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.DummyRequest) *milvuspb.DummyResponse); ok { r0 = rf(ctx, request) } else { @@ -1259,6 +1220,7 @@ func (_m *Proxy) Dummy(ctx context.Context, request *milvuspb.DummyRequest) (*mi } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.DummyRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1274,8 +1236,8 @@ type Proxy_Dummy_Call struct { } // Dummy is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.DummyRequest +// - ctx context.Context +// - request *milvuspb.DummyRequest func (_e *Proxy_Expecter) Dummy(ctx interface{}, request interface{}) *Proxy_Dummy_Call { return &Proxy_Dummy_Call{Call: _e.mock.On("Dummy", ctx, request)} } @@ -1292,20 +1254,11 @@ func (_c *Proxy_Dummy_Call) Return(_a0 *milvuspb.DummyResponse, _a1 error) *Prox return _c } -func (_c *Proxy_Dummy_Call) RunAndReturn(run func(context.Context, *milvuspb.DummyRequest) (*milvuspb.DummyResponse, error)) *Proxy_Dummy_Call { - _c.Call.Return(run) - return _c -} - // Flush provides a mock function with given fields: ctx, request func (_m *Proxy) Flush(ctx context.Context, request *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.FlushResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushRequest) *milvuspb.FlushResponse); ok { r0 = rf(ctx, request) } else { @@ -1314,6 +1267,7 @@ func (_m *Proxy) Flush(ctx context.Context, request *milvuspb.FlushRequest) (*mi } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.FlushRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1329,8 +1283,8 @@ type Proxy_Flush_Call struct { } // Flush is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.FlushRequest +// - ctx context.Context +// - request *milvuspb.FlushRequest func (_e *Proxy_Expecter) Flush(ctx interface{}, request interface{}) *Proxy_Flush_Call { return &Proxy_Flush_Call{Call: _e.mock.On("Flush", ctx, request)} } @@ -1347,20 +1301,11 @@ func (_c *Proxy_Flush_Call) Return(_a0 *milvuspb.FlushResponse, _a1 error) *Prox return _c } -func (_c *Proxy_Flush_Call) RunAndReturn(run func(context.Context, *milvuspb.FlushRequest) (*milvuspb.FlushResponse, error)) *Proxy_Flush_Call { - _c.Call.Return(run) - return _c -} - // FlushAll provides a mock function with given fields: ctx, request func (_m *Proxy) FlushAll(ctx context.Context, request *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.FlushAllResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.FlushAllRequest) *milvuspb.FlushAllResponse); ok { r0 = rf(ctx, request) } else { @@ -1369,6 +1314,7 @@ func (_m *Proxy) FlushAll(ctx context.Context, request *milvuspb.FlushAllRequest } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.FlushAllRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1384,8 +1330,8 @@ type Proxy_FlushAll_Call struct { } // FlushAll is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.FlushAllRequest +// - ctx context.Context +// - request *milvuspb.FlushAllRequest func (_e *Proxy_Expecter) FlushAll(ctx interface{}, request interface{}) *Proxy_FlushAll_Call { return &Proxy_FlushAll_Call{Call: _e.mock.On("FlushAll", ctx, request)} } @@ -1402,20 +1348,11 @@ func (_c *Proxy_FlushAll_Call) Return(_a0 *milvuspb.FlushAllResponse, _a1 error) return _c } -func (_c *Proxy_FlushAll_Call) RunAndReturn(run func(context.Context, *milvuspb.FlushAllRequest) (*milvuspb.FlushAllResponse, error)) *Proxy_FlushAll_Call { - _c.Call.Return(run) - return _c -} - // GetCollectionStatistics provides a mock function with given fields: ctx, request func (_m *Proxy) GetCollectionStatistics(ctx context.Context, request *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetCollectionStatisticsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) *milvuspb.GetCollectionStatisticsResponse); ok { r0 = rf(ctx, request) } else { @@ -1424,6 +1361,7 @@ func (_m *Proxy) GetCollectionStatistics(ctx context.Context, request *milvuspb. } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetCollectionStatisticsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1439,8 +1377,8 @@ type Proxy_GetCollectionStatistics_Call struct { } // GetCollectionStatistics is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetCollectionStatisticsRequest +// - ctx context.Context +// - request *milvuspb.GetCollectionStatisticsRequest func (_e *Proxy_Expecter) GetCollectionStatistics(ctx interface{}, request interface{}) *Proxy_GetCollectionStatistics_Call { return &Proxy_GetCollectionStatistics_Call{Call: _e.mock.On("GetCollectionStatistics", ctx, request)} } @@ -1457,20 +1395,11 @@ func (_c *Proxy_GetCollectionStatistics_Call) Return(_a0 *milvuspb.GetCollection return _c } -func (_c *Proxy_GetCollectionStatistics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetCollectionStatisticsRequest) (*milvuspb.GetCollectionStatisticsResponse, error)) *Proxy_GetCollectionStatistics_Call { - _c.Call.Return(run) - return _c -} - // GetCompactionState provides a mock function with given fields: ctx, req func (_m *Proxy) GetCompactionState(ctx context.Context, req *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.GetCompactionStateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionStateRequest) *milvuspb.GetCompactionStateResponse); ok { r0 = rf(ctx, req) } else { @@ -1479,6 +1408,7 @@ func (_m *Proxy) GetCompactionState(ctx context.Context, req *milvuspb.GetCompac } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetCompactionStateRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1494,8 +1424,8 @@ type Proxy_GetCompactionState_Call struct { } // GetCompactionState is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.GetCompactionStateRequest +// - ctx context.Context +// - req *milvuspb.GetCompactionStateRequest func (_e *Proxy_Expecter) GetCompactionState(ctx interface{}, req interface{}) *Proxy_GetCompactionState_Call { return &Proxy_GetCompactionState_Call{Call: _e.mock.On("GetCompactionState", ctx, req)} } @@ -1512,20 +1442,11 @@ func (_c *Proxy_GetCompactionState_Call) Return(_a0 *milvuspb.GetCompactionState return _c } -func (_c *Proxy_GetCompactionState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetCompactionStateRequest) (*milvuspb.GetCompactionStateResponse, error)) *Proxy_GetCompactionState_Call { - _c.Call.Return(run) - return _c -} - // GetCompactionStateWithPlans provides a mock function with given fields: ctx, req func (_m *Proxy) GetCompactionStateWithPlans(ctx context.Context, req *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.GetCompactionPlansResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetCompactionPlansRequest) *milvuspb.GetCompactionPlansResponse); ok { r0 = rf(ctx, req) } else { @@ -1534,6 +1455,7 @@ func (_m *Proxy) GetCompactionStateWithPlans(ctx context.Context, req *milvuspb. } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetCompactionPlansRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1549,8 +1471,8 @@ type Proxy_GetCompactionStateWithPlans_Call struct { } // GetCompactionStateWithPlans is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.GetCompactionPlansRequest +// - ctx context.Context +// - req *milvuspb.GetCompactionPlansRequest func (_e *Proxy_Expecter) GetCompactionStateWithPlans(ctx interface{}, req interface{}) *Proxy_GetCompactionStateWithPlans_Call { return &Proxy_GetCompactionStateWithPlans_Call{Call: _e.mock.On("GetCompactionStateWithPlans", ctx, req)} } @@ -1567,20 +1489,11 @@ func (_c *Proxy_GetCompactionStateWithPlans_Call) Return(_a0 *milvuspb.GetCompac return _c } -func (_c *Proxy_GetCompactionStateWithPlans_Call) RunAndReturn(run func(context.Context, *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error)) *Proxy_GetCompactionStateWithPlans_Call { - _c.Call.Return(run) - return _c -} - // GetComponentStates provides a mock function with given fields: ctx func (_m *Proxy) GetComponentStates(ctx context.Context) (*milvuspb.ComponentStates, error) { ret := _m.Called(ctx) var r0 *milvuspb.ComponentStates - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*milvuspb.ComponentStates, error)); ok { - return rf(ctx) - } if rf, ok := ret.Get(0).(func(context.Context) *milvuspb.ComponentStates); ok { r0 = rf(ctx) } else { @@ -1589,6 +1502,7 @@ func (_m *Proxy) GetComponentStates(ctx context.Context) (*milvuspb.ComponentSta } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -1604,7 +1518,7 @@ type Proxy_GetComponentStates_Call struct { } // GetComponentStates is a helper method to define mock.On call -// - ctx context.Context +// - ctx context.Context func (_e *Proxy_Expecter) GetComponentStates(ctx interface{}) *Proxy_GetComponentStates_Call { return &Proxy_GetComponentStates_Call{Call: _e.mock.On("GetComponentStates", ctx)} } @@ -1621,20 +1535,11 @@ func (_c *Proxy_GetComponentStates_Call) Return(_a0 *milvuspb.ComponentStates, _ return _c } -func (_c *Proxy_GetComponentStates_Call) RunAndReturn(run func(context.Context) (*milvuspb.ComponentStates, error)) *Proxy_GetComponentStates_Call { - _c.Call.Return(run) - return _c -} - // GetDdChannel provides a mock function with given fields: ctx, request func (_m *Proxy) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *internalpb.GetDdChannelRequest) *milvuspb.StringResponse); ok { r0 = rf(ctx, request) } else { @@ -1643,6 +1548,7 @@ func (_m *Proxy) GetDdChannel(ctx context.Context, request *internalpb.GetDdChan } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *internalpb.GetDdChannelRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1658,8 +1564,8 @@ type Proxy_GetDdChannel_Call struct { } // GetDdChannel is a helper method to define mock.On call -// - ctx context.Context -// - request *internalpb.GetDdChannelRequest +// - ctx context.Context +// - request *internalpb.GetDdChannelRequest func (_e *Proxy_Expecter) GetDdChannel(ctx interface{}, request interface{}) *Proxy_GetDdChannel_Call { return &Proxy_GetDdChannel_Call{Call: _e.mock.On("GetDdChannel", ctx, request)} } @@ -1676,20 +1582,11 @@ func (_c *Proxy_GetDdChannel_Call) Return(_a0 *milvuspb.StringResponse, _a1 erro return _c } -func (_c *Proxy_GetDdChannel_Call) RunAndReturn(run func(context.Context, *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error)) *Proxy_GetDdChannel_Call { - _c.Call.Return(run) - return _c -} - // GetFlushAllState provides a mock function with given fields: ctx, req func (_m *Proxy) GetFlushAllState(ctx context.Context, req *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.GetFlushAllStateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushAllStateRequest) *milvuspb.GetFlushAllStateResponse); ok { r0 = rf(ctx, req) } else { @@ -1698,6 +1595,7 @@ func (_m *Proxy) GetFlushAllState(ctx context.Context, req *milvuspb.GetFlushAll } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetFlushAllStateRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1713,8 +1611,8 @@ type Proxy_GetFlushAllState_Call struct { } // GetFlushAllState is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.GetFlushAllStateRequest +// - ctx context.Context +// - req *milvuspb.GetFlushAllStateRequest func (_e *Proxy_Expecter) GetFlushAllState(ctx interface{}, req interface{}) *Proxy_GetFlushAllState_Call { return &Proxy_GetFlushAllState_Call{Call: _e.mock.On("GetFlushAllState", ctx, req)} } @@ -1731,20 +1629,11 @@ func (_c *Proxy_GetFlushAllState_Call) Return(_a0 *milvuspb.GetFlushAllStateResp return _c } -func (_c *Proxy_GetFlushAllState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetFlushAllStateRequest) (*milvuspb.GetFlushAllStateResponse, error)) *Proxy_GetFlushAllState_Call { - _c.Call.Return(run) - return _c -} - // GetFlushState provides a mock function with given fields: ctx, req func (_m *Proxy) GetFlushState(ctx context.Context, req *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.GetFlushStateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetFlushStateRequest) *milvuspb.GetFlushStateResponse); ok { r0 = rf(ctx, req) } else { @@ -1753,6 +1642,7 @@ func (_m *Proxy) GetFlushState(ctx context.Context, req *milvuspb.GetFlushStateR } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetFlushStateRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1768,8 +1658,8 @@ type Proxy_GetFlushState_Call struct { } // GetFlushState is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.GetFlushStateRequest +// - ctx context.Context +// - req *milvuspb.GetFlushStateRequest func (_e *Proxy_Expecter) GetFlushState(ctx interface{}, req interface{}) *Proxy_GetFlushState_Call { return &Proxy_GetFlushState_Call{Call: _e.mock.On("GetFlushState", ctx, req)} } @@ -1786,20 +1676,11 @@ func (_c *Proxy_GetFlushState_Call) Return(_a0 *milvuspb.GetFlushStateResponse, return _c } -func (_c *Proxy_GetFlushState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetFlushStateRequest) (*milvuspb.GetFlushStateResponse, error)) *Proxy_GetFlushState_Call { - _c.Call.Return(run) - return _c -} - // GetImportState provides a mock function with given fields: ctx, req func (_m *Proxy) GetImportState(ctx context.Context, req *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.GetImportStateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetImportStateRequest) *milvuspb.GetImportStateResponse); ok { r0 = rf(ctx, req) } else { @@ -1808,6 +1689,7 @@ func (_m *Proxy) GetImportState(ctx context.Context, req *milvuspb.GetImportStat } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetImportStateRequest) error); ok { r1 = rf(ctx, req) } else { @@ -1823,8 +1705,8 @@ type Proxy_GetImportState_Call struct { } // GetImportState is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.GetImportStateRequest +// - ctx context.Context +// - req *milvuspb.GetImportStateRequest func (_e *Proxy_Expecter) GetImportState(ctx interface{}, req interface{}) *Proxy_GetImportState_Call { return &Proxy_GetImportState_Call{Call: _e.mock.On("GetImportState", ctx, req)} } @@ -1841,20 +1723,11 @@ func (_c *Proxy_GetImportState_Call) Return(_a0 *milvuspb.GetImportStateResponse return _c } -func (_c *Proxy_GetImportState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetImportStateRequest) (*milvuspb.GetImportStateResponse, error)) *Proxy_GetImportState_Call { - _c.Call.Return(run) - return _c -} - // GetIndexBuildProgress provides a mock function with given fields: ctx, request func (_m *Proxy) GetIndexBuildProgress(ctx context.Context, request *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetIndexBuildProgressResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) *milvuspb.GetIndexBuildProgressResponse); ok { r0 = rf(ctx, request) } else { @@ -1863,6 +1736,7 @@ func (_m *Proxy) GetIndexBuildProgress(ctx context.Context, request *milvuspb.Ge } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetIndexBuildProgressRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1878,8 +1752,8 @@ type Proxy_GetIndexBuildProgress_Call struct { } // GetIndexBuildProgress is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetIndexBuildProgressRequest +// - ctx context.Context +// - request *milvuspb.GetIndexBuildProgressRequest func (_e *Proxy_Expecter) GetIndexBuildProgress(ctx interface{}, request interface{}) *Proxy_GetIndexBuildProgress_Call { return &Proxy_GetIndexBuildProgress_Call{Call: _e.mock.On("GetIndexBuildProgress", ctx, request)} } @@ -1896,20 +1770,11 @@ func (_c *Proxy_GetIndexBuildProgress_Call) Return(_a0 *milvuspb.GetIndexBuildPr return _c } -func (_c *Proxy_GetIndexBuildProgress_Call) RunAndReturn(run func(context.Context, *milvuspb.GetIndexBuildProgressRequest) (*milvuspb.GetIndexBuildProgressResponse, error)) *Proxy_GetIndexBuildProgress_Call { - _c.Call.Return(run) - return _c -} - // GetIndexState provides a mock function with given fields: ctx, request func (_m *Proxy) GetIndexState(ctx context.Context, request *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetIndexStateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetIndexStateRequest) *milvuspb.GetIndexStateResponse); ok { r0 = rf(ctx, request) } else { @@ -1918,6 +1783,7 @@ func (_m *Proxy) GetIndexState(ctx context.Context, request *milvuspb.GetIndexSt } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetIndexStateRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1933,8 +1799,8 @@ type Proxy_GetIndexState_Call struct { } // GetIndexState is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetIndexStateRequest +// - ctx context.Context +// - request *milvuspb.GetIndexStateRequest func (_e *Proxy_Expecter) GetIndexState(ctx interface{}, request interface{}) *Proxy_GetIndexState_Call { return &Proxy_GetIndexState_Call{Call: _e.mock.On("GetIndexState", ctx, request)} } @@ -1951,20 +1817,11 @@ func (_c *Proxy_GetIndexState_Call) Return(_a0 *milvuspb.GetIndexStateResponse, return _c } -func (_c *Proxy_GetIndexState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetIndexStateRequest) (*milvuspb.GetIndexStateResponse, error)) *Proxy_GetIndexState_Call { - _c.Call.Return(run) - return _c -} - // GetLoadState provides a mock function with given fields: ctx, request func (_m *Proxy) GetLoadState(ctx context.Context, request *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetLoadStateResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadStateRequest) *milvuspb.GetLoadStateResponse); ok { r0 = rf(ctx, request) } else { @@ -1973,6 +1830,7 @@ func (_m *Proxy) GetLoadState(ctx context.Context, request *milvuspb.GetLoadStat } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetLoadStateRequest) error); ok { r1 = rf(ctx, request) } else { @@ -1988,8 +1846,8 @@ type Proxy_GetLoadState_Call struct { } // GetLoadState is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetLoadStateRequest +// - ctx context.Context +// - request *milvuspb.GetLoadStateRequest func (_e *Proxy_Expecter) GetLoadState(ctx interface{}, request interface{}) *Proxy_GetLoadState_Call { return &Proxy_GetLoadState_Call{Call: _e.mock.On("GetLoadState", ctx, request)} } @@ -2006,20 +1864,11 @@ func (_c *Proxy_GetLoadState_Call) Return(_a0 *milvuspb.GetLoadStateResponse, _a return _c } -func (_c *Proxy_GetLoadState_Call) RunAndReturn(run func(context.Context, *milvuspb.GetLoadStateRequest) (*milvuspb.GetLoadStateResponse, error)) *Proxy_GetLoadState_Call { - _c.Call.Return(run) - return _c -} - // GetLoadingProgress provides a mock function with given fields: ctx, request func (_m *Proxy) GetLoadingProgress(ctx context.Context, request *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetLoadingProgressResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetLoadingProgressRequest) *milvuspb.GetLoadingProgressResponse); ok { r0 = rf(ctx, request) } else { @@ -2028,6 +1877,7 @@ func (_m *Proxy) GetLoadingProgress(ctx context.Context, request *milvuspb.GetLo } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetLoadingProgressRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2043,8 +1893,8 @@ type Proxy_GetLoadingProgress_Call struct { } // GetLoadingProgress is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetLoadingProgressRequest +// - ctx context.Context +// - request *milvuspb.GetLoadingProgressRequest func (_e *Proxy_Expecter) GetLoadingProgress(ctx interface{}, request interface{}) *Proxy_GetLoadingProgress_Call { return &Proxy_GetLoadingProgress_Call{Call: _e.mock.On("GetLoadingProgress", ctx, request)} } @@ -2061,20 +1911,11 @@ func (_c *Proxy_GetLoadingProgress_Call) Return(_a0 *milvuspb.GetLoadingProgress return _c } -func (_c *Proxy_GetLoadingProgress_Call) RunAndReturn(run func(context.Context, *milvuspb.GetLoadingProgressRequest) (*milvuspb.GetLoadingProgressResponse, error)) *Proxy_GetLoadingProgress_Call { - _c.Call.Return(run) - return _c -} - // GetMetrics provides a mock function with given fields: ctx, request func (_m *Proxy) GetMetrics(ctx context.Context, request *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetMetricsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok { r0 = rf(ctx, request) } else { @@ -2083,6 +1924,7 @@ func (_m *Proxy) GetMetrics(ctx context.Context, request *milvuspb.GetMetricsReq } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2098,8 +1940,8 @@ type Proxy_GetMetrics_Call struct { } // GetMetrics is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetMetricsRequest +// - ctx context.Context +// - request *milvuspb.GetMetricsRequest func (_e *Proxy_Expecter) GetMetrics(ctx interface{}, request interface{}) *Proxy_GetMetrics_Call { return &Proxy_GetMetrics_Call{Call: _e.mock.On("GetMetrics", ctx, request)} } @@ -2116,20 +1958,11 @@ func (_c *Proxy_GetMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _a1 er return _c } -func (_c *Proxy_GetMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *Proxy_GetMetrics_Call { - _c.Call.Return(run) - return _c -} - // GetPartitionStatistics provides a mock function with given fields: ctx, request func (_m *Proxy) GetPartitionStatistics(ctx context.Context, request *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetPartitionStatisticsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) *milvuspb.GetPartitionStatisticsResponse); ok { r0 = rf(ctx, request) } else { @@ -2138,6 +1971,7 @@ func (_m *Proxy) GetPartitionStatistics(ctx context.Context, request *milvuspb.G } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetPartitionStatisticsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2153,8 +1987,8 @@ type Proxy_GetPartitionStatistics_Call struct { } // GetPartitionStatistics is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetPartitionStatisticsRequest +// - ctx context.Context +// - request *milvuspb.GetPartitionStatisticsRequest func (_e *Proxy_Expecter) GetPartitionStatistics(ctx interface{}, request interface{}) *Proxy_GetPartitionStatistics_Call { return &Proxy_GetPartitionStatistics_Call{Call: _e.mock.On("GetPartitionStatistics", ctx, request)} } @@ -2171,20 +2005,11 @@ func (_c *Proxy_GetPartitionStatistics_Call) Return(_a0 *milvuspb.GetPartitionSt return _c } -func (_c *Proxy_GetPartitionStatistics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetPartitionStatisticsRequest) (*milvuspb.GetPartitionStatisticsResponse, error)) *Proxy_GetPartitionStatistics_Call { - _c.Call.Return(run) - return _c -} - // GetPersistentSegmentInfo provides a mock function with given fields: ctx, request func (_m *Proxy) GetPersistentSegmentInfo(ctx context.Context, request *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetPersistentSegmentInfoResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) *milvuspb.GetPersistentSegmentInfoResponse); ok { r0 = rf(ctx, request) } else { @@ -2193,6 +2018,7 @@ func (_m *Proxy) GetPersistentSegmentInfo(ctx context.Context, request *milvuspb } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2208,8 +2034,8 @@ type Proxy_GetPersistentSegmentInfo_Call struct { } // GetPersistentSegmentInfo is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetPersistentSegmentInfoRequest +// - ctx context.Context +// - request *milvuspb.GetPersistentSegmentInfoRequest func (_e *Proxy_Expecter) GetPersistentSegmentInfo(ctx interface{}, request interface{}) *Proxy_GetPersistentSegmentInfo_Call { return &Proxy_GetPersistentSegmentInfo_Call{Call: _e.mock.On("GetPersistentSegmentInfo", ctx, request)} } @@ -2226,20 +2052,11 @@ func (_c *Proxy_GetPersistentSegmentInfo_Call) Return(_a0 *milvuspb.GetPersisten return _c } -func (_c *Proxy_GetPersistentSegmentInfo_Call) RunAndReturn(run func(context.Context, *milvuspb.GetPersistentSegmentInfoRequest) (*milvuspb.GetPersistentSegmentInfoResponse, error)) *Proxy_GetPersistentSegmentInfo_Call { - _c.Call.Return(run) - return _c -} - // GetProxyMetrics provides a mock function with given fields: ctx, request func (_m *Proxy) GetProxyMetrics(ctx context.Context, request *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetMetricsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetMetricsRequest) *milvuspb.GetMetricsResponse); ok { r0 = rf(ctx, request) } else { @@ -2248,6 +2065,7 @@ func (_m *Proxy) GetProxyMetrics(ctx context.Context, request *milvuspb.GetMetri } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetMetricsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2263,8 +2081,8 @@ type Proxy_GetProxyMetrics_Call struct { } // GetProxyMetrics is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetMetricsRequest +// - ctx context.Context +// - request *milvuspb.GetMetricsRequest func (_e *Proxy_Expecter) GetProxyMetrics(ctx interface{}, request interface{}) *Proxy_GetProxyMetrics_Call { return &Proxy_GetProxyMetrics_Call{Call: _e.mock.On("GetProxyMetrics", ctx, request)} } @@ -2281,20 +2099,11 @@ func (_c *Proxy_GetProxyMetrics_Call) Return(_a0 *milvuspb.GetMetricsResponse, _ return _c } -func (_c *Proxy_GetProxyMetrics_Call) RunAndReturn(run func(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)) *Proxy_GetProxyMetrics_Call { - _c.Call.Return(run) - return _c -} - // GetQuerySegmentInfo provides a mock function with given fields: ctx, request func (_m *Proxy) GetQuerySegmentInfo(ctx context.Context, request *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.GetQuerySegmentInfoResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) *milvuspb.GetQuerySegmentInfoResponse); ok { r0 = rf(ctx, request) } else { @@ -2303,6 +2112,7 @@ func (_m *Proxy) GetQuerySegmentInfo(ctx context.Context, request *milvuspb.GetQ } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2318,8 +2128,8 @@ type Proxy_GetQuerySegmentInfo_Call struct { } // GetQuerySegmentInfo is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.GetQuerySegmentInfoRequest +// - ctx context.Context +// - request *milvuspb.GetQuerySegmentInfoRequest func (_e *Proxy_Expecter) GetQuerySegmentInfo(ctx interface{}, request interface{}) *Proxy_GetQuerySegmentInfo_Call { return &Proxy_GetQuerySegmentInfo_Call{Call: _e.mock.On("GetQuerySegmentInfo", ctx, request)} } @@ -2336,20 +2146,11 @@ func (_c *Proxy_GetQuerySegmentInfo_Call) Return(_a0 *milvuspb.GetQuerySegmentIn return _c } -func (_c *Proxy_GetQuerySegmentInfo_Call) RunAndReturn(run func(context.Context, *milvuspb.GetQuerySegmentInfoRequest) (*milvuspb.GetQuerySegmentInfoResponse, error)) *Proxy_GetQuerySegmentInfo_Call { - _c.Call.Return(run) - return _c -} - // GetRateLimiter provides a mock function with given fields: func (_m *Proxy) GetRateLimiter() (types.Limiter, error) { ret := _m.Called() var r0 types.Limiter - var r1 error - if rf, ok := ret.Get(0).(func() (types.Limiter, error)); ok { - return rf() - } if rf, ok := ret.Get(0).(func() types.Limiter); ok { r0 = rf() } else { @@ -2358,6 +2159,7 @@ func (_m *Proxy) GetRateLimiter() (types.Limiter, error) { } } + var r1 error if rf, ok := ret.Get(1).(func() error); ok { r1 = rf() } else { @@ -2389,20 +2191,11 @@ func (_c *Proxy_GetRateLimiter_Call) Return(_a0 types.Limiter, _a1 error) *Proxy return _c } -func (_c *Proxy_GetRateLimiter_Call) RunAndReturn(run func() (types.Limiter, error)) *Proxy_GetRateLimiter_Call { - _c.Call.Return(run) - return _c -} - // GetReplicas provides a mock function with given fields: ctx, req func (_m *Proxy) GetReplicas(ctx context.Context, req *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.GetReplicasResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.GetReplicasRequest) *milvuspb.GetReplicasResponse); ok { r0 = rf(ctx, req) } else { @@ -2411,6 +2204,7 @@ func (_m *Proxy) GetReplicas(ctx context.Context, req *milvuspb.GetReplicasReque } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.GetReplicasRequest) error); ok { r1 = rf(ctx, req) } else { @@ -2426,8 +2220,8 @@ type Proxy_GetReplicas_Call struct { } // GetReplicas is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.GetReplicasRequest +// - ctx context.Context +// - req *milvuspb.GetReplicasRequest func (_e *Proxy_Expecter) GetReplicas(ctx interface{}, req interface{}) *Proxy_GetReplicas_Call { return &Proxy_GetReplicas_Call{Call: _e.mock.On("GetReplicas", ctx, req)} } @@ -2444,20 +2238,11 @@ func (_c *Proxy_GetReplicas_Call) Return(_a0 *milvuspb.GetReplicasResponse, _a1 return _c } -func (_c *Proxy_GetReplicas_Call) RunAndReturn(run func(context.Context, *milvuspb.GetReplicasRequest) (*milvuspb.GetReplicasResponse, error)) *Proxy_GetReplicas_Call { - _c.Call.Return(run) - return _c -} - // GetStatisticsChannel provides a mock function with given fields: ctx func (_m *Proxy) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResponse, error) { ret := _m.Called(ctx) var r0 *milvuspb.StringResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*milvuspb.StringResponse, error)); ok { - return rf(ctx) - } if rf, ok := ret.Get(0).(func(context.Context) *milvuspb.StringResponse); ok { r0 = rf(ctx) } else { @@ -2466,6 +2251,7 @@ func (_m *Proxy) GetStatisticsChannel(ctx context.Context) (*milvuspb.StringResp } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(ctx) } else { @@ -2481,7 +2267,7 @@ type Proxy_GetStatisticsChannel_Call struct { } // GetStatisticsChannel is a helper method to define mock.On call -// - ctx context.Context +// - ctx context.Context func (_e *Proxy_Expecter) GetStatisticsChannel(ctx interface{}) *Proxy_GetStatisticsChannel_Call { return &Proxy_GetStatisticsChannel_Call{Call: _e.mock.On("GetStatisticsChannel", ctx)} } @@ -2498,20 +2284,11 @@ func (_c *Proxy_GetStatisticsChannel_Call) Return(_a0 *milvuspb.StringResponse, return _c } -func (_c *Proxy_GetStatisticsChannel_Call) RunAndReturn(run func(context.Context) (*milvuspb.StringResponse, error)) *Proxy_GetStatisticsChannel_Call { - _c.Call.Return(run) - return _c -} - // HasCollection provides a mock function with given fields: ctx, request func (_m *Proxy) HasCollection(ctx context.Context, request *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.BoolResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasCollectionRequest) *milvuspb.BoolResponse); ok { r0 = rf(ctx, request) } else { @@ -2520,6 +2297,7 @@ func (_m *Proxy) HasCollection(ctx context.Context, request *milvuspb.HasCollect } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.HasCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2535,8 +2313,8 @@ type Proxy_HasCollection_Call struct { } // HasCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.HasCollectionRequest +// - ctx context.Context +// - request *milvuspb.HasCollectionRequest func (_e *Proxy_Expecter) HasCollection(ctx interface{}, request interface{}) *Proxy_HasCollection_Call { return &Proxy_HasCollection_Call{Call: _e.mock.On("HasCollection", ctx, request)} } @@ -2553,20 +2331,11 @@ func (_c *Proxy_HasCollection_Call) Return(_a0 *milvuspb.BoolResponse, _a1 error return _c } -func (_c *Proxy_HasCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.HasCollectionRequest) (*milvuspb.BoolResponse, error)) *Proxy_HasCollection_Call { - _c.Call.Return(run) - return _c -} - // HasPartition provides a mock function with given fields: ctx, request func (_m *Proxy) HasPartition(ctx context.Context, request *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.BoolResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.HasPartitionRequest) *milvuspb.BoolResponse); ok { r0 = rf(ctx, request) } else { @@ -2575,6 +2344,7 @@ func (_m *Proxy) HasPartition(ctx context.Context, request *milvuspb.HasPartitio } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.HasPartitionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2590,8 +2360,8 @@ type Proxy_HasPartition_Call struct { } // HasPartition is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.HasPartitionRequest +// - ctx context.Context +// - request *milvuspb.HasPartitionRequest func (_e *Proxy_Expecter) HasPartition(ctx interface{}, request interface{}) *Proxy_HasPartition_Call { return &Proxy_HasPartition_Call{Call: _e.mock.On("HasPartition", ctx, request)} } @@ -2608,20 +2378,11 @@ func (_c *Proxy_HasPartition_Call) Return(_a0 *milvuspb.BoolResponse, _a1 error) return _c } -func (_c *Proxy_HasPartition_Call) RunAndReturn(run func(context.Context, *milvuspb.HasPartitionRequest) (*milvuspb.BoolResponse, error)) *Proxy_HasPartition_Call { - _c.Call.Return(run) - return _c -} - // Import provides a mock function with given fields: ctx, req func (_m *Proxy) Import(ctx context.Context, req *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.ImportResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ImportRequest) *milvuspb.ImportResponse); ok { r0 = rf(ctx, req) } else { @@ -2630,6 +2391,7 @@ func (_m *Proxy) Import(ctx context.Context, req *milvuspb.ImportRequest) (*milv } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ImportRequest) error); ok { r1 = rf(ctx, req) } else { @@ -2645,8 +2407,8 @@ type Proxy_Import_Call struct { } // Import is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.ImportRequest +// - ctx context.Context +// - req *milvuspb.ImportRequest func (_e *Proxy_Expecter) Import(ctx interface{}, req interface{}) *Proxy_Import_Call { return &Proxy_Import_Call{Call: _e.mock.On("Import", ctx, req)} } @@ -2663,11 +2425,6 @@ func (_c *Proxy_Import_Call) Return(_a0 *milvuspb.ImportResponse, _a1 error) *Pr return _c } -func (_c *Proxy_Import_Call) RunAndReturn(run func(context.Context, *milvuspb.ImportRequest) (*milvuspb.ImportResponse, error)) *Proxy_Import_Call { - _c.Call.Return(run) - return _c -} - // Init provides a mock function with given fields: func (_m *Proxy) Init() error { ret := _m.Called() @@ -2704,20 +2461,11 @@ func (_c *Proxy_Init_Call) Return(_a0 error) *Proxy_Init_Call { return _c } -func (_c *Proxy_Init_Call) RunAndReturn(run func() error) *Proxy_Init_Call { - _c.Call.Return(run) - return _c -} - // Insert provides a mock function with given fields: ctx, request func (_m *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest) (*milvuspb.MutationResult, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.MutationResult - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.InsertRequest) (*milvuspb.MutationResult, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.InsertRequest) *milvuspb.MutationResult); ok { r0 = rf(ctx, request) } else { @@ -2726,6 +2474,7 @@ func (_m *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest) (* } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.InsertRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2741,8 +2490,8 @@ type Proxy_Insert_Call struct { } // Insert is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.InsertRequest +// - ctx context.Context +// - request *milvuspb.InsertRequest func (_e *Proxy_Expecter) Insert(ctx interface{}, request interface{}) *Proxy_Insert_Call { return &Proxy_Insert_Call{Call: _e.mock.On("Insert", ctx, request)} } @@ -2759,20 +2508,11 @@ func (_c *Proxy_Insert_Call) Return(_a0 *milvuspb.MutationResult, _a1 error) *Pr return _c } -func (_c *Proxy_Insert_Call) RunAndReturn(run func(context.Context, *milvuspb.InsertRequest) (*milvuspb.MutationResult, error)) *Proxy_Insert_Call { - _c.Call.Return(run) - return _c -} - // InvalidateCollectionMetaCache provides a mock function with given fields: ctx, request func (_m *Proxy) InvalidateCollectionMetaCache(ctx context.Context, request *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -2781,6 +2521,7 @@ func (_m *Proxy) InvalidateCollectionMetaCache(ctx context.Context, request *pro } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2796,8 +2537,8 @@ type Proxy_InvalidateCollectionMetaCache_Call struct { } // InvalidateCollectionMetaCache is a helper method to define mock.On call -// - ctx context.Context -// - request *proxypb.InvalidateCollMetaCacheRequest +// - ctx context.Context +// - request *proxypb.InvalidateCollMetaCacheRequest func (_e *Proxy_Expecter) InvalidateCollectionMetaCache(ctx interface{}, request interface{}) *Proxy_InvalidateCollectionMetaCache_Call { return &Proxy_InvalidateCollectionMetaCache_Call{Call: _e.mock.On("InvalidateCollectionMetaCache", ctx, request)} } @@ -2814,20 +2555,11 @@ func (_c *Proxy_InvalidateCollectionMetaCache_Call) Return(_a0 *commonpb.Status, return _c } -func (_c *Proxy_InvalidateCollectionMetaCache_Call) RunAndReturn(run func(context.Context, *proxypb.InvalidateCollMetaCacheRequest) (*commonpb.Status, error)) *Proxy_InvalidateCollectionMetaCache_Call { - _c.Call.Return(run) - return _c -} - // InvalidateCredentialCache provides a mock function with given fields: ctx, request func (_m *Proxy) InvalidateCredentialCache(ctx context.Context, request *proxypb.InvalidateCredCacheRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *proxypb.InvalidateCredCacheRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *proxypb.InvalidateCredCacheRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -2836,6 +2568,7 @@ func (_m *Proxy) InvalidateCredentialCache(ctx context.Context, request *proxypb } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *proxypb.InvalidateCredCacheRequest) error); ok { r1 = rf(ctx, request) } else { @@ -2851,8 +2584,8 @@ type Proxy_InvalidateCredentialCache_Call struct { } // InvalidateCredentialCache is a helper method to define mock.On call -// - ctx context.Context -// - request *proxypb.InvalidateCredCacheRequest +// - ctx context.Context +// - request *proxypb.InvalidateCredCacheRequest func (_e *Proxy_Expecter) InvalidateCredentialCache(ctx interface{}, request interface{}) *Proxy_InvalidateCredentialCache_Call { return &Proxy_InvalidateCredentialCache_Call{Call: _e.mock.On("InvalidateCredentialCache", ctx, request)} } @@ -2869,8 +2602,50 @@ func (_c *Proxy_InvalidateCredentialCache_Call) Return(_a0 *commonpb.Status, _a1 return _c } -func (_c *Proxy_InvalidateCredentialCache_Call) RunAndReturn(run func(context.Context, *proxypb.InvalidateCredCacheRequest) (*commonpb.Status, error)) *Proxy_InvalidateCredentialCache_Call { - _c.Call.Return(run) +// ListClientInfos provides a mock function with given fields: ctx, req +func (_m *Proxy) ListClientInfos(ctx context.Context, req *proxypb.ListClientInfosRequest) (*proxypb.ListClientInfosResponse, error) { + ret := _m.Called(ctx, req) + + var r0 *proxypb.ListClientInfosResponse + if rf, ok := ret.Get(0).(func(context.Context, *proxypb.ListClientInfosRequest) *proxypb.ListClientInfosResponse); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*proxypb.ListClientInfosResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *proxypb.ListClientInfosRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Proxy_ListClientInfos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListClientInfos' +type Proxy_ListClientInfos_Call struct { + *mock.Call +} + +// ListClientInfos is a helper method to define mock.On call +// - ctx context.Context +// - req *proxypb.ListClientInfosRequest +func (_e *Proxy_Expecter) ListClientInfos(ctx interface{}, req interface{}) *Proxy_ListClientInfos_Call { + return &Proxy_ListClientInfos_Call{Call: _e.mock.On("ListClientInfos", ctx, req)} +} + +func (_c *Proxy_ListClientInfos_Call) Run(run func(ctx context.Context, req *proxypb.ListClientInfosRequest)) *Proxy_ListClientInfos_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*proxypb.ListClientInfosRequest)) + }) + return _c +} + +func (_c *Proxy_ListClientInfos_Call) Return(_a0 *proxypb.ListClientInfosResponse, _a1 error) *Proxy_ListClientInfos_Call { + _c.Call.Return(_a0, _a1) return _c } @@ -2879,10 +2654,6 @@ func (_m *Proxy) ListCredUsers(ctx context.Context, req *milvuspb.ListCredUsersR ret := _m.Called(ctx, req) var r0 *milvuspb.ListCredUsersResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListCredUsersRequest) *milvuspb.ListCredUsersResponse); ok { r0 = rf(ctx, req) } else { @@ -2891,6 +2662,7 @@ func (_m *Proxy) ListCredUsers(ctx context.Context, req *milvuspb.ListCredUsersR } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListCredUsersRequest) error); ok { r1 = rf(ctx, req) } else { @@ -2906,8 +2678,8 @@ type Proxy_ListCredUsers_Call struct { } // ListCredUsers is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.ListCredUsersRequest +// - ctx context.Context +// - req *milvuspb.ListCredUsersRequest func (_e *Proxy_Expecter) ListCredUsers(ctx interface{}, req interface{}) *Proxy_ListCredUsers_Call { return &Proxy_ListCredUsers_Call{Call: _e.mock.On("ListCredUsers", ctx, req)} } @@ -2924,8 +2696,50 @@ func (_c *Proxy_ListCredUsers_Call) Return(_a0 *milvuspb.ListCredUsersResponse, return _c } -func (_c *Proxy_ListCredUsers_Call) RunAndReturn(run func(context.Context, *milvuspb.ListCredUsersRequest) (*milvuspb.ListCredUsersResponse, error)) *Proxy_ListCredUsers_Call { - _c.Call.Return(run) +// ListDatabases provides a mock function with given fields: ctx, req +func (_m *Proxy) ListDatabases(ctx context.Context, req *milvuspb.ListDatabasesRequest) (*milvuspb.ListDatabasesResponse, error) { + ret := _m.Called(ctx, req) + + var r0 *milvuspb.ListDatabasesResponse + if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListDatabasesRequest) *milvuspb.ListDatabasesResponse); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*milvuspb.ListDatabasesResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListDatabasesRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Proxy_ListDatabases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDatabases' +type Proxy_ListDatabases_Call struct { + *mock.Call +} + +// ListDatabases is a helper method to define mock.On call +// - ctx context.Context +// - req *milvuspb.ListDatabasesRequest +func (_e *Proxy_Expecter) ListDatabases(ctx interface{}, req interface{}) *Proxy_ListDatabases_Call { + return &Proxy_ListDatabases_Call{Call: _e.mock.On("ListDatabases", ctx, req)} +} + +func (_c *Proxy_ListDatabases_Call) Run(run func(ctx context.Context, req *milvuspb.ListDatabasesRequest)) *Proxy_ListDatabases_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*milvuspb.ListDatabasesRequest)) + }) + return _c +} + +func (_c *Proxy_ListDatabases_Call) Return(_a0 *milvuspb.ListDatabasesResponse, _a1 error) *Proxy_ListDatabases_Call { + _c.Call.Return(_a0, _a1) return _c } @@ -2934,10 +2748,6 @@ func (_m *Proxy) ListImportTasks(ctx context.Context, req *milvuspb.ListImportTa ret := _m.Called(ctx, req) var r0 *milvuspb.ListImportTasksResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListImportTasksRequest) *milvuspb.ListImportTasksResponse); ok { r0 = rf(ctx, req) } else { @@ -2946,6 +2756,7 @@ func (_m *Proxy) ListImportTasks(ctx context.Context, req *milvuspb.ListImportTa } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListImportTasksRequest) error); ok { r1 = rf(ctx, req) } else { @@ -2961,8 +2772,8 @@ type Proxy_ListImportTasks_Call struct { } // ListImportTasks is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.ListImportTasksRequest +// - ctx context.Context +// - req *milvuspb.ListImportTasksRequest func (_e *Proxy_Expecter) ListImportTasks(ctx interface{}, req interface{}) *Proxy_ListImportTasks_Call { return &Proxy_ListImportTasks_Call{Call: _e.mock.On("ListImportTasks", ctx, req)} } @@ -2979,20 +2790,11 @@ func (_c *Proxy_ListImportTasks_Call) Return(_a0 *milvuspb.ListImportTasksRespon return _c } -func (_c *Proxy_ListImportTasks_Call) RunAndReturn(run func(context.Context, *milvuspb.ListImportTasksRequest) (*milvuspb.ListImportTasksResponse, error)) *Proxy_ListImportTasks_Call { - _c.Call.Return(run) - return _c -} - // ListResourceGroups provides a mock function with given fields: ctx, req func (_m *Proxy) ListResourceGroups(ctx context.Context, req *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.ListResourceGroupsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ListResourceGroupsRequest) *milvuspb.ListResourceGroupsResponse); ok { r0 = rf(ctx, req) } else { @@ -3001,6 +2803,7 @@ func (_m *Proxy) ListResourceGroups(ctx context.Context, req *milvuspb.ListResou } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ListResourceGroupsRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3016,8 +2819,8 @@ type Proxy_ListResourceGroups_Call struct { } // ListResourceGroups is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.ListResourceGroupsRequest +// - ctx context.Context +// - req *milvuspb.ListResourceGroupsRequest func (_e *Proxy_Expecter) ListResourceGroups(ctx interface{}, req interface{}) *Proxy_ListResourceGroups_Call { return &Proxy_ListResourceGroups_Call{Call: _e.mock.On("ListResourceGroups", ctx, req)} } @@ -3034,20 +2837,11 @@ func (_c *Proxy_ListResourceGroups_Call) Return(_a0 *milvuspb.ListResourceGroups return _c } -func (_c *Proxy_ListResourceGroups_Call) RunAndReturn(run func(context.Context, *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error)) *Proxy_ListResourceGroups_Call { - _c.Call.Return(run) - return _c -} - // LoadBalance provides a mock function with given fields: ctx, request func (_m *Proxy) LoadBalance(ctx context.Context, request *milvuspb.LoadBalanceRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadBalanceRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadBalanceRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -3056,6 +2850,7 @@ func (_m *Proxy) LoadBalance(ctx context.Context, request *milvuspb.LoadBalanceR } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.LoadBalanceRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3071,8 +2866,8 @@ type Proxy_LoadBalance_Call struct { } // LoadBalance is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.LoadBalanceRequest +// - ctx context.Context +// - request *milvuspb.LoadBalanceRequest func (_e *Proxy_Expecter) LoadBalance(ctx interface{}, request interface{}) *Proxy_LoadBalance_Call { return &Proxy_LoadBalance_Call{Call: _e.mock.On("LoadBalance", ctx, request)} } @@ -3089,20 +2884,11 @@ func (_c *Proxy_LoadBalance_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy return _c } -func (_c *Proxy_LoadBalance_Call) RunAndReturn(run func(context.Context, *milvuspb.LoadBalanceRequest) (*commonpb.Status, error)) *Proxy_LoadBalance_Call { - _c.Call.Return(run) - return _c -} - // LoadCollection provides a mock function with given fields: ctx, request func (_m *Proxy) LoadCollection(ctx context.Context, request *milvuspb.LoadCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadCollectionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadCollectionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -3111,6 +2897,7 @@ func (_m *Proxy) LoadCollection(ctx context.Context, request *milvuspb.LoadColle } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.LoadCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3126,8 +2913,8 @@ type Proxy_LoadCollection_Call struct { } // LoadCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.LoadCollectionRequest +// - ctx context.Context +// - request *milvuspb.LoadCollectionRequest func (_e *Proxy_Expecter) LoadCollection(ctx interface{}, request interface{}) *Proxy_LoadCollection_Call { return &Proxy_LoadCollection_Call{Call: _e.mock.On("LoadCollection", ctx, request)} } @@ -3144,20 +2931,11 @@ func (_c *Proxy_LoadCollection_Call) Return(_a0 *commonpb.Status, _a1 error) *Pr return _c } -func (_c *Proxy_LoadCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.LoadCollectionRequest) (*commonpb.Status, error)) *Proxy_LoadCollection_Call { - _c.Call.Return(run) - return _c -} - // LoadPartitions provides a mock function with given fields: ctx, request func (_m *Proxy) LoadPartitions(ctx context.Context, request *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.LoadPartitionsRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -3166,6 +2944,7 @@ func (_m *Proxy) LoadPartitions(ctx context.Context, request *milvuspb.LoadParti } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.LoadPartitionsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3181,8 +2960,8 @@ type Proxy_LoadPartitions_Call struct { } // LoadPartitions is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.LoadPartitionsRequest +// - ctx context.Context +// - request *milvuspb.LoadPartitionsRequest func (_e *Proxy_Expecter) LoadPartitions(ctx interface{}, request interface{}) *Proxy_LoadPartitions_Call { return &Proxy_LoadPartitions_Call{Call: _e.mock.On("LoadPartitions", ctx, request)} } @@ -3199,20 +2978,11 @@ func (_c *Proxy_LoadPartitions_Call) Return(_a0 *commonpb.Status, _a1 error) *Pr return _c } -func (_c *Proxy_LoadPartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.LoadPartitionsRequest) (*commonpb.Status, error)) *Proxy_LoadPartitions_Call { - _c.Call.Return(run) - return _c -} - // ManualCompaction provides a mock function with given fields: ctx, req func (_m *Proxy) ManualCompaction(ctx context.Context, req *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.ManualCompactionResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ManualCompactionRequest) *milvuspb.ManualCompactionResponse); ok { r0 = rf(ctx, req) } else { @@ -3221,6 +2991,7 @@ func (_m *Proxy) ManualCompaction(ctx context.Context, req *milvuspb.ManualCompa } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ManualCompactionRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3236,8 +3007,8 @@ type Proxy_ManualCompaction_Call struct { } // ManualCompaction is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.ManualCompactionRequest +// - ctx context.Context +// - req *milvuspb.ManualCompactionRequest func (_e *Proxy_Expecter) ManualCompaction(ctx interface{}, req interface{}) *Proxy_ManualCompaction_Call { return &Proxy_ManualCompaction_Call{Call: _e.mock.On("ManualCompaction", ctx, req)} } @@ -3254,20 +3025,11 @@ func (_c *Proxy_ManualCompaction_Call) Return(_a0 *milvuspb.ManualCompactionResp return _c } -func (_c *Proxy_ManualCompaction_Call) RunAndReturn(run func(context.Context, *milvuspb.ManualCompactionRequest) (*milvuspb.ManualCompactionResponse, error)) *Proxy_ManualCompaction_Call { - _c.Call.Return(run) - return _c -} - // OperatePrivilege provides a mock function with given fields: ctx, req func (_m *Proxy) OperatePrivilege(ctx context.Context, req *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperatePrivilegeRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -3276,6 +3038,7 @@ func (_m *Proxy) OperatePrivilege(ctx context.Context, req *milvuspb.OperatePriv } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.OperatePrivilegeRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3291,8 +3054,8 @@ type Proxy_OperatePrivilege_Call struct { } // OperatePrivilege is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.OperatePrivilegeRequest +// - ctx context.Context +// - req *milvuspb.OperatePrivilegeRequest func (_e *Proxy_Expecter) OperatePrivilege(ctx interface{}, req interface{}) *Proxy_OperatePrivilege_Call { return &Proxy_OperatePrivilege_Call{Call: _e.mock.On("OperatePrivilege", ctx, req)} } @@ -3309,20 +3072,11 @@ func (_c *Proxy_OperatePrivilege_Call) Return(_a0 *commonpb.Status, _a1 error) * return _c } -func (_c *Proxy_OperatePrivilege_Call) RunAndReturn(run func(context.Context, *milvuspb.OperatePrivilegeRequest) (*commonpb.Status, error)) *Proxy_OperatePrivilege_Call { - _c.Call.Return(run) - return _c -} - // OperateUserRole provides a mock function with given fields: ctx, req func (_m *Proxy) OperateUserRole(ctx context.Context, req *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.OperateUserRoleRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -3331,6 +3085,7 @@ func (_m *Proxy) OperateUserRole(ctx context.Context, req *milvuspb.OperateUserR } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.OperateUserRoleRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3346,8 +3101,8 @@ type Proxy_OperateUserRole_Call struct { } // OperateUserRole is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.OperateUserRoleRequest +// - ctx context.Context +// - req *milvuspb.OperateUserRoleRequest func (_e *Proxy_Expecter) OperateUserRole(ctx interface{}, req interface{}) *Proxy_OperateUserRole_Call { return &Proxy_OperateUserRole_Call{Call: _e.mock.On("OperateUserRole", ctx, req)} } @@ -3364,20 +3119,11 @@ func (_c *Proxy_OperateUserRole_Call) Return(_a0 *commonpb.Status, _a1 error) *P return _c } -func (_c *Proxy_OperateUserRole_Call) RunAndReturn(run func(context.Context, *milvuspb.OperateUserRoleRequest) (*commonpb.Status, error)) *Proxy_OperateUserRole_Call { - _c.Call.Return(run) - return _c -} - // Query provides a mock function with given fields: ctx, request func (_m *Proxy) Query(ctx context.Context, request *milvuspb.QueryRequest) (*milvuspb.QueryResults, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.QueryResults - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.QueryRequest) (*milvuspb.QueryResults, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.QueryRequest) *milvuspb.QueryResults); ok { r0 = rf(ctx, request) } else { @@ -3386,6 +3132,7 @@ func (_m *Proxy) Query(ctx context.Context, request *milvuspb.QueryRequest) (*mi } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.QueryRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3401,8 +3148,8 @@ type Proxy_Query_Call struct { } // Query is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.QueryRequest +// - ctx context.Context +// - request *milvuspb.QueryRequest func (_e *Proxy_Expecter) Query(ctx interface{}, request interface{}) *Proxy_Query_Call { return &Proxy_Query_Call{Call: _e.mock.On("Query", ctx, request)} } @@ -3419,20 +3166,11 @@ func (_c *Proxy_Query_Call) Return(_a0 *milvuspb.QueryResults, _a1 error) *Proxy return _c } -func (_c *Proxy_Query_Call) RunAndReturn(run func(context.Context, *milvuspb.QueryRequest) (*milvuspb.QueryResults, error)) *Proxy_Query_Call { - _c.Call.Return(run) - return _c -} - // RefreshPolicyInfoCache provides a mock function with given fields: ctx, req func (_m *Proxy) RefreshPolicyInfoCache(ctx context.Context, req *proxypb.RefreshPolicyInfoCacheRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *proxypb.RefreshPolicyInfoCacheRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *proxypb.RefreshPolicyInfoCacheRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -3441,6 +3179,7 @@ func (_m *Proxy) RefreshPolicyInfoCache(ctx context.Context, req *proxypb.Refres } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *proxypb.RefreshPolicyInfoCacheRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3456,8 +3195,8 @@ type Proxy_RefreshPolicyInfoCache_Call struct { } // RefreshPolicyInfoCache is a helper method to define mock.On call -// - ctx context.Context -// - req *proxypb.RefreshPolicyInfoCacheRequest +// - ctx context.Context +// - req *proxypb.RefreshPolicyInfoCacheRequest func (_e *Proxy_Expecter) RefreshPolicyInfoCache(ctx interface{}, req interface{}) *Proxy_RefreshPolicyInfoCache_Call { return &Proxy_RefreshPolicyInfoCache_Call{Call: _e.mock.On("RefreshPolicyInfoCache", ctx, req)} } @@ -3474,11 +3213,6 @@ func (_c *Proxy_RefreshPolicyInfoCache_Call) Return(_a0 *commonpb.Status, _a1 er return _c } -func (_c *Proxy_RefreshPolicyInfoCache_Call) RunAndReturn(run func(context.Context, *proxypb.RefreshPolicyInfoCacheRequest) (*commonpb.Status, error)) *Proxy_RefreshPolicyInfoCache_Call { - _c.Call.Return(run) - return _c -} - // Register provides a mock function with given fields: func (_m *Proxy) Register() error { ret := _m.Called() @@ -3515,20 +3249,11 @@ func (_c *Proxy_Register_Call) Return(_a0 error) *Proxy_Register_Call { return _c } -func (_c *Proxy_Register_Call) RunAndReturn(run func() error) *Proxy_Register_Call { - _c.Call.Return(run) - return _c -} - // RegisterLink provides a mock function with given fields: ctx, request func (_m *Proxy) RegisterLink(ctx context.Context, request *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.RegisterLinkResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RegisterLinkRequest) *milvuspb.RegisterLinkResponse); ok { r0 = rf(ctx, request) } else { @@ -3537,6 +3262,7 @@ func (_m *Proxy) RegisterLink(ctx context.Context, request *milvuspb.RegisterLin } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RegisterLinkRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3552,8 +3278,8 @@ type Proxy_RegisterLink_Call struct { } // RegisterLink is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.RegisterLinkRequest +// - ctx context.Context +// - request *milvuspb.RegisterLinkRequest func (_e *Proxy_Expecter) RegisterLink(ctx interface{}, request interface{}) *Proxy_RegisterLink_Call { return &Proxy_RegisterLink_Call{Call: _e.mock.On("RegisterLink", ctx, request)} } @@ -3570,20 +3296,11 @@ func (_c *Proxy_RegisterLink_Call) Return(_a0 *milvuspb.RegisterLinkResponse, _a return _c } -func (_c *Proxy_RegisterLink_Call) RunAndReturn(run func(context.Context, *milvuspb.RegisterLinkRequest) (*milvuspb.RegisterLinkResponse, error)) *Proxy_RegisterLink_Call { - _c.Call.Return(run) - return _c -} - // ReleaseCollection provides a mock function with given fields: ctx, request func (_m *Proxy) ReleaseCollection(ctx context.Context, request *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleaseCollectionRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -3592,6 +3309,7 @@ func (_m *Proxy) ReleaseCollection(ctx context.Context, request *milvuspb.Releas } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ReleaseCollectionRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3607,8 +3325,8 @@ type Proxy_ReleaseCollection_Call struct { } // ReleaseCollection is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.ReleaseCollectionRequest +// - ctx context.Context +// - request *milvuspb.ReleaseCollectionRequest func (_e *Proxy_Expecter) ReleaseCollection(ctx interface{}, request interface{}) *Proxy_ReleaseCollection_Call { return &Proxy_ReleaseCollection_Call{Call: _e.mock.On("ReleaseCollection", ctx, request)} } @@ -3625,20 +3343,11 @@ func (_c *Proxy_ReleaseCollection_Call) Return(_a0 *commonpb.Status, _a1 error) return _c } -func (_c *Proxy_ReleaseCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.ReleaseCollectionRequest) (*commonpb.Status, error)) *Proxy_ReleaseCollection_Call { - _c.Call.Return(run) - return _c -} - // ReleasePartitions provides a mock function with given fields: ctx, request func (_m *Proxy) ReleasePartitions(ctx context.Context, request *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ReleasePartitionsRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -3647,6 +3356,7 @@ func (_m *Proxy) ReleasePartitions(ctx context.Context, request *milvuspb.Releas } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ReleasePartitionsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3662,8 +3372,8 @@ type Proxy_ReleasePartitions_Call struct { } // ReleasePartitions is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.ReleasePartitionsRequest +// - ctx context.Context +// - request *milvuspb.ReleasePartitionsRequest func (_e *Proxy_Expecter) ReleasePartitions(ctx interface{}, request interface{}) *Proxy_ReleasePartitions_Call { return &Proxy_ReleasePartitions_Call{Call: _e.mock.On("ReleasePartitions", ctx, request)} } @@ -3680,20 +3390,11 @@ func (_c *Proxy_ReleasePartitions_Call) Return(_a0 *commonpb.Status, _a1 error) return _c } -func (_c *Proxy_ReleasePartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.ReleasePartitionsRequest) (*commonpb.Status, error)) *Proxy_ReleasePartitions_Call { - _c.Call.Return(run) - return _c -} - // RenameCollection provides a mock function with given fields: ctx, req func (_m *Proxy) RenameCollection(ctx context.Context, req *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.RenameCollectionRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -3702,6 +3403,7 @@ func (_m *Proxy) RenameCollection(ctx context.Context, req *milvuspb.RenameColle } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.RenameCollectionRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3717,8 +3419,8 @@ type Proxy_RenameCollection_Call struct { } // RenameCollection is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.RenameCollectionRequest +// - ctx context.Context +// - req *milvuspb.RenameCollectionRequest func (_e *Proxy_Expecter) RenameCollection(ctx interface{}, req interface{}) *Proxy_RenameCollection_Call { return &Proxy_RenameCollection_Call{Call: _e.mock.On("RenameCollection", ctx, req)} } @@ -3735,20 +3437,11 @@ func (_c *Proxy_RenameCollection_Call) Return(_a0 *commonpb.Status, _a1 error) * return _c } -func (_c *Proxy_RenameCollection_Call) RunAndReturn(run func(context.Context, *milvuspb.RenameCollectionRequest) (*commonpb.Status, error)) *Proxy_RenameCollection_Call { - _c.Call.Return(run) - return _c -} - // Search provides a mock function with given fields: ctx, request func (_m *Proxy) Search(ctx context.Context, request *milvuspb.SearchRequest) (*milvuspb.SearchResults, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.SearchResults - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequest) (*milvuspb.SearchResults, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SearchRequest) *milvuspb.SearchResults); ok { r0 = rf(ctx, request) } else { @@ -3757,6 +3450,7 @@ func (_m *Proxy) Search(ctx context.Context, request *milvuspb.SearchRequest) (* } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SearchRequest) error); ok { r1 = rf(ctx, request) } else { @@ -3772,8 +3466,8 @@ type Proxy_Search_Call struct { } // Search is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.SearchRequest +// - ctx context.Context +// - request *milvuspb.SearchRequest func (_e *Proxy_Expecter) Search(ctx interface{}, request interface{}) *Proxy_Search_Call { return &Proxy_Search_Call{Call: _e.mock.On("Search", ctx, request)} } @@ -3790,20 +3484,11 @@ func (_c *Proxy_Search_Call) Return(_a0 *milvuspb.SearchResults, _a1 error) *Pro return _c } -func (_c *Proxy_Search_Call) RunAndReturn(run func(context.Context, *milvuspb.SearchRequest) (*milvuspb.SearchResults, error)) *Proxy_Search_Call { - _c.Call.Return(run) - return _c -} - // SelectGrant provides a mock function with given fields: ctx, req func (_m *Proxy) SelectGrant(ctx context.Context, req *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.SelectGrantResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectGrantRequest) *milvuspb.SelectGrantResponse); ok { r0 = rf(ctx, req) } else { @@ -3812,6 +3497,7 @@ func (_m *Proxy) SelectGrant(ctx context.Context, req *milvuspb.SelectGrantReque } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SelectGrantRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3827,8 +3513,8 @@ type Proxy_SelectGrant_Call struct { } // SelectGrant is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.SelectGrantRequest +// - ctx context.Context +// - req *milvuspb.SelectGrantRequest func (_e *Proxy_Expecter) SelectGrant(ctx interface{}, req interface{}) *Proxy_SelectGrant_Call { return &Proxy_SelectGrant_Call{Call: _e.mock.On("SelectGrant", ctx, req)} } @@ -3845,20 +3531,11 @@ func (_c *Proxy_SelectGrant_Call) Return(_a0 *milvuspb.SelectGrantResponse, _a1 return _c } -func (_c *Proxy_SelectGrant_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectGrantRequest) (*milvuspb.SelectGrantResponse, error)) *Proxy_SelectGrant_Call { - _c.Call.Return(run) - return _c -} - // SelectRole provides a mock function with given fields: ctx, req func (_m *Proxy) SelectRole(ctx context.Context, req *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.SelectRoleResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectRoleRequest) *milvuspb.SelectRoleResponse); ok { r0 = rf(ctx, req) } else { @@ -3867,6 +3544,7 @@ func (_m *Proxy) SelectRole(ctx context.Context, req *milvuspb.SelectRoleRequest } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SelectRoleRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3882,8 +3560,8 @@ type Proxy_SelectRole_Call struct { } // SelectRole is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.SelectRoleRequest +// - ctx context.Context +// - req *milvuspb.SelectRoleRequest func (_e *Proxy_Expecter) SelectRole(ctx interface{}, req interface{}) *Proxy_SelectRole_Call { return &Proxy_SelectRole_Call{Call: _e.mock.On("SelectRole", ctx, req)} } @@ -3900,20 +3578,11 @@ func (_c *Proxy_SelectRole_Call) Return(_a0 *milvuspb.SelectRoleResponse, _a1 er return _c } -func (_c *Proxy_SelectRole_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectRoleRequest) (*milvuspb.SelectRoleResponse, error)) *Proxy_SelectRole_Call { - _c.Call.Return(run) - return _c -} - // SelectUser provides a mock function with given fields: ctx, req func (_m *Proxy) SelectUser(ctx context.Context, req *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error) { ret := _m.Called(ctx, req) var r0 *milvuspb.SelectUserResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.SelectUserRequest) *milvuspb.SelectUserResponse); ok { r0 = rf(ctx, req) } else { @@ -3922,6 +3591,7 @@ func (_m *Proxy) SelectUser(ctx context.Context, req *milvuspb.SelectUserRequest } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.SelectUserRequest) error); ok { r1 = rf(ctx, req) } else { @@ -3937,8 +3607,8 @@ type Proxy_SelectUser_Call struct { } // SelectUser is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.SelectUserRequest +// - ctx context.Context +// - req *milvuspb.SelectUserRequest func (_e *Proxy_Expecter) SelectUser(ctx interface{}, req interface{}) *Proxy_SelectUser_Call { return &Proxy_SelectUser_Call{Call: _e.mock.On("SelectUser", ctx, req)} } @@ -3955,11 +3625,6 @@ func (_c *Proxy_SelectUser_Call) Return(_a0 *milvuspb.SelectUserResponse, _a1 er return _c } -func (_c *Proxy_SelectUser_Call) RunAndReturn(run func(context.Context, *milvuspb.SelectUserRequest) (*milvuspb.SelectUserResponse, error)) *Proxy_SelectUser_Call { - _c.Call.Return(run) - return _c -} - // SetDataCoordClient provides a mock function with given fields: dataCoord func (_m *Proxy) SetDataCoordClient(dataCoord types.DataCoord) { _m.Called(dataCoord) @@ -3971,7 +3636,7 @@ type Proxy_SetDataCoordClient_Call struct { } // SetDataCoordClient is a helper method to define mock.On call -// - dataCoord types.DataCoord +// - dataCoord types.DataCoord func (_e *Proxy_Expecter) SetDataCoordClient(dataCoord interface{}) *Proxy_SetDataCoordClient_Call { return &Proxy_SetDataCoordClient_Call{Call: _e.mock.On("SetDataCoordClient", dataCoord)} } @@ -3988,11 +3653,6 @@ func (_c *Proxy_SetDataCoordClient_Call) Return() *Proxy_SetDataCoordClient_Call return _c } -func (_c *Proxy_SetDataCoordClient_Call) RunAndReturn(run func(types.DataCoord)) *Proxy_SetDataCoordClient_Call { - _c.Call.Return(run) - return _c -} - // SetEtcdClient provides a mock function with given fields: etcdClient func (_m *Proxy) SetEtcdClient(etcdClient *clientv3.Client) { _m.Called(etcdClient) @@ -4004,7 +3664,7 @@ type Proxy_SetEtcdClient_Call struct { } // SetEtcdClient is a helper method to define mock.On call -// - etcdClient *clientv3.Client +// - etcdClient *clientv3.Client func (_e *Proxy_Expecter) SetEtcdClient(etcdClient interface{}) *Proxy_SetEtcdClient_Call { return &Proxy_SetEtcdClient_Call{Call: _e.mock.On("SetEtcdClient", etcdClient)} } @@ -4021,11 +3681,6 @@ func (_c *Proxy_SetEtcdClient_Call) Return() *Proxy_SetEtcdClient_Call { return _c } -func (_c *Proxy_SetEtcdClient_Call) RunAndReturn(run func(*clientv3.Client)) *Proxy_SetEtcdClient_Call { - _c.Call.Return(run) - return _c -} - // SetIndexCoordClient provides a mock function with given fields: indexCoord func (_m *Proxy) SetIndexCoordClient(indexCoord types.IndexCoord) { _m.Called(indexCoord) @@ -4037,7 +3692,7 @@ type Proxy_SetIndexCoordClient_Call struct { } // SetIndexCoordClient is a helper method to define mock.On call -// - indexCoord types.IndexCoord +// - indexCoord types.IndexCoord func (_e *Proxy_Expecter) SetIndexCoordClient(indexCoord interface{}) *Proxy_SetIndexCoordClient_Call { return &Proxy_SetIndexCoordClient_Call{Call: _e.mock.On("SetIndexCoordClient", indexCoord)} } @@ -4054,11 +3709,6 @@ func (_c *Proxy_SetIndexCoordClient_Call) Return() *Proxy_SetIndexCoordClient_Ca return _c } -func (_c *Proxy_SetIndexCoordClient_Call) RunAndReturn(run func(types.IndexCoord)) *Proxy_SetIndexCoordClient_Call { - _c.Call.Return(run) - return _c -} - // SetQueryCoordClient provides a mock function with given fields: queryCoord func (_m *Proxy) SetQueryCoordClient(queryCoord types.QueryCoord) { _m.Called(queryCoord) @@ -4070,7 +3720,7 @@ type Proxy_SetQueryCoordClient_Call struct { } // SetQueryCoordClient is a helper method to define mock.On call -// - queryCoord types.QueryCoord +// - queryCoord types.QueryCoord func (_e *Proxy_Expecter) SetQueryCoordClient(queryCoord interface{}) *Proxy_SetQueryCoordClient_Call { return &Proxy_SetQueryCoordClient_Call{Call: _e.mock.On("SetQueryCoordClient", queryCoord)} } @@ -4087,20 +3737,11 @@ func (_c *Proxy_SetQueryCoordClient_Call) Return() *Proxy_SetQueryCoordClient_Ca return _c } -func (_c *Proxy_SetQueryCoordClient_Call) RunAndReturn(run func(types.QueryCoord)) *Proxy_SetQueryCoordClient_Call { - _c.Call.Return(run) - return _c -} - // SetRates provides a mock function with given fields: ctx, req func (_m *Proxy) SetRates(ctx context.Context, req *proxypb.SetRatesRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *proxypb.SetRatesRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *proxypb.SetRatesRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -4109,6 +3750,7 @@ func (_m *Proxy) SetRates(ctx context.Context, req *proxypb.SetRatesRequest) (*c } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *proxypb.SetRatesRequest) error); ok { r1 = rf(ctx, req) } else { @@ -4124,8 +3766,8 @@ type Proxy_SetRates_Call struct { } // SetRates is a helper method to define mock.On call -// - ctx context.Context -// - req *proxypb.SetRatesRequest +// - ctx context.Context +// - req *proxypb.SetRatesRequest func (_e *Proxy_Expecter) SetRates(ctx interface{}, req interface{}) *Proxy_SetRates_Call { return &Proxy_SetRates_Call{Call: _e.mock.On("SetRates", ctx, req)} } @@ -4142,11 +3784,6 @@ func (_c *Proxy_SetRates_Call) Return(_a0 *commonpb.Status, _a1 error) *Proxy_Se return _c } -func (_c *Proxy_SetRates_Call) RunAndReturn(run func(context.Context, *proxypb.SetRatesRequest) (*commonpb.Status, error)) *Proxy_SetRates_Call { - _c.Call.Return(run) - return _c -} - // SetRootCoordClient provides a mock function with given fields: rootCoord func (_m *Proxy) SetRootCoordClient(rootCoord types.RootCoord) { _m.Called(rootCoord) @@ -4158,7 +3795,7 @@ type Proxy_SetRootCoordClient_Call struct { } // SetRootCoordClient is a helper method to define mock.On call -// - rootCoord types.RootCoord +// - rootCoord types.RootCoord func (_e *Proxy_Expecter) SetRootCoordClient(rootCoord interface{}) *Proxy_SetRootCoordClient_Call { return &Proxy_SetRootCoordClient_Call{Call: _e.mock.On("SetRootCoordClient", rootCoord)} } @@ -4175,20 +3812,11 @@ func (_c *Proxy_SetRootCoordClient_Call) Return() *Proxy_SetRootCoordClient_Call return _c } -func (_c *Proxy_SetRootCoordClient_Call) RunAndReturn(run func(types.RootCoord)) *Proxy_SetRootCoordClient_Call { - _c.Call.Return(run) - return _c -} - // ShowCollections provides a mock function with given fields: ctx, request func (_m *Proxy) ShowCollections(ctx context.Context, request *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.ShowCollectionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowCollectionsRequest) *milvuspb.ShowCollectionsResponse); ok { r0 = rf(ctx, request) } else { @@ -4197,6 +3825,7 @@ func (_m *Proxy) ShowCollections(ctx context.Context, request *milvuspb.ShowColl } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ShowCollectionsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -4212,8 +3841,8 @@ type Proxy_ShowCollections_Call struct { } // ShowCollections is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.ShowCollectionsRequest +// - ctx context.Context +// - request *milvuspb.ShowCollectionsRequest func (_e *Proxy_Expecter) ShowCollections(ctx interface{}, request interface{}) *Proxy_ShowCollections_Call { return &Proxy_ShowCollections_Call{Call: _e.mock.On("ShowCollections", ctx, request)} } @@ -4230,20 +3859,11 @@ func (_c *Proxy_ShowCollections_Call) Return(_a0 *milvuspb.ShowCollectionsRespon return _c } -func (_c *Proxy_ShowCollections_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowCollectionsRequest) (*milvuspb.ShowCollectionsResponse, error)) *Proxy_ShowCollections_Call { - _c.Call.Return(run) - return _c -} - // ShowPartitions provides a mock function with given fields: ctx, request func (_m *Proxy) ShowPartitions(ctx context.Context, request *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error) { ret := _m.Called(ctx, request) var r0 *milvuspb.ShowPartitionsResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.ShowPartitionsRequest) *milvuspb.ShowPartitionsResponse); ok { r0 = rf(ctx, request) } else { @@ -4252,6 +3872,7 @@ func (_m *Proxy) ShowPartitions(ctx context.Context, request *milvuspb.ShowParti } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.ShowPartitionsRequest) error); ok { r1 = rf(ctx, request) } else { @@ -4267,8 +3888,8 @@ type Proxy_ShowPartitions_Call struct { } // ShowPartitions is a helper method to define mock.On call -// - ctx context.Context -// - request *milvuspb.ShowPartitionsRequest +// - ctx context.Context +// - request *milvuspb.ShowPartitionsRequest func (_e *Proxy_Expecter) ShowPartitions(ctx interface{}, request interface{}) *Proxy_ShowPartitions_Call { return &Proxy_ShowPartitions_Call{Call: _e.mock.On("ShowPartitions", ctx, request)} } @@ -4285,11 +3906,6 @@ func (_c *Proxy_ShowPartitions_Call) Return(_a0 *milvuspb.ShowPartitionsResponse return _c } -func (_c *Proxy_ShowPartitions_Call) RunAndReturn(run func(context.Context, *milvuspb.ShowPartitionsRequest) (*milvuspb.ShowPartitionsResponse, error)) *Proxy_ShowPartitions_Call { - _c.Call.Return(run) - return _c -} - // Start provides a mock function with given fields: func (_m *Proxy) Start() error { ret := _m.Called() @@ -4326,11 +3942,6 @@ func (_c *Proxy_Start_Call) Return(_a0 error) *Proxy_Start_Call { return _c } -func (_c *Proxy_Start_Call) RunAndReturn(run func() error) *Proxy_Start_Call { - _c.Call.Return(run) - return _c -} - // Stop provides a mock function with given fields: func (_m *Proxy) Stop() error { ret := _m.Called() @@ -4367,20 +3978,11 @@ func (_c *Proxy_Stop_Call) Return(_a0 error) *Proxy_Stop_Call { return _c } -func (_c *Proxy_Stop_Call) RunAndReturn(run func() error) *Proxy_Stop_Call { - _c.Call.Return(run) - return _c -} - // TransferNode provides a mock function with given fields: ctx, req func (_m *Proxy) TransferNode(ctx context.Context, req *milvuspb.TransferNodeRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferNodeRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -4389,6 +3991,7 @@ func (_m *Proxy) TransferNode(ctx context.Context, req *milvuspb.TransferNodeReq } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferNodeRequest) error); ok { r1 = rf(ctx, req) } else { @@ -4404,8 +4007,8 @@ type Proxy_TransferNode_Call struct { } // TransferNode is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.TransferNodeRequest +// - ctx context.Context +// - req *milvuspb.TransferNodeRequest func (_e *Proxy_Expecter) TransferNode(ctx interface{}, req interface{}) *Proxy_TransferNode_Call { return &Proxy_TransferNode_Call{Call: _e.mock.On("TransferNode", ctx, req)} } @@ -4422,20 +4025,11 @@ func (_c *Proxy_TransferNode_Call) Return(_a0 *commonpb.Status, _a1 error) *Prox return _c } -func (_c *Proxy_TransferNode_Call) RunAndReturn(run func(context.Context, *milvuspb.TransferNodeRequest) (*commonpb.Status, error)) *Proxy_TransferNode_Call { - _c.Call.Return(run) - return _c -} - // TransferReplica provides a mock function with given fields: ctx, req func (_m *Proxy) TransferReplica(ctx context.Context, req *milvuspb.TransferReplicaRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferReplicaRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.TransferReplicaRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -4444,6 +4038,7 @@ func (_m *Proxy) TransferReplica(ctx context.Context, req *milvuspb.TransferRepl } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.TransferReplicaRequest) error); ok { r1 = rf(ctx, req) } else { @@ -4459,8 +4054,8 @@ type Proxy_TransferReplica_Call struct { } // TransferReplica is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.TransferReplicaRequest +// - ctx context.Context +// - req *milvuspb.TransferReplicaRequest func (_e *Proxy_Expecter) TransferReplica(ctx interface{}, req interface{}) *Proxy_TransferReplica_Call { return &Proxy_TransferReplica_Call{Call: _e.mock.On("TransferReplica", ctx, req)} } @@ -4477,20 +4072,11 @@ func (_c *Proxy_TransferReplica_Call) Return(_a0 *commonpb.Status, _a1 error) *P return _c } -func (_c *Proxy_TransferReplica_Call) RunAndReturn(run func(context.Context, *milvuspb.TransferReplicaRequest) (*commonpb.Status, error)) *Proxy_TransferReplica_Call { - _c.Call.Return(run) - return _c -} - // UpdateCredential provides a mock function with given fields: ctx, req func (_m *Proxy) UpdateCredential(ctx context.Context, req *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, req) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error)); ok { - return rf(ctx, req) - } if rf, ok := ret.Get(0).(func(context.Context, *milvuspb.UpdateCredentialRequest) *commonpb.Status); ok { r0 = rf(ctx, req) } else { @@ -4499,6 +4085,7 @@ func (_m *Proxy) UpdateCredential(ctx context.Context, req *milvuspb.UpdateCrede } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *milvuspb.UpdateCredentialRequest) error); ok { r1 = rf(ctx, req) } else { @@ -4514,8 +4101,8 @@ type Proxy_UpdateCredential_Call struct { } // UpdateCredential is a helper method to define mock.On call -// - ctx context.Context -// - req *milvuspb.UpdateCredentialRequest +// - ctx context.Context +// - req *milvuspb.UpdateCredentialRequest func (_e *Proxy_Expecter) UpdateCredential(ctx interface{}, req interface{}) *Proxy_UpdateCredential_Call { return &Proxy_UpdateCredential_Call{Call: _e.mock.On("UpdateCredential", ctx, req)} } @@ -4532,20 +4119,11 @@ func (_c *Proxy_UpdateCredential_Call) Return(_a0 *commonpb.Status, _a1 error) * return _c } -func (_c *Proxy_UpdateCredential_Call) RunAndReturn(run func(context.Context, *milvuspb.UpdateCredentialRequest) (*commonpb.Status, error)) *Proxy_UpdateCredential_Call { - _c.Call.Return(run) - return _c -} - // UpdateCredentialCache provides a mock function with given fields: ctx, request func (_m *Proxy) UpdateCredentialCache(ctx context.Context, request *proxypb.UpdateCredCacheRequest) (*commonpb.Status, error) { ret := _m.Called(ctx, request) var r0 *commonpb.Status - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *proxypb.UpdateCredCacheRequest) (*commonpb.Status, error)); ok { - return rf(ctx, request) - } if rf, ok := ret.Get(0).(func(context.Context, *proxypb.UpdateCredCacheRequest) *commonpb.Status); ok { r0 = rf(ctx, request) } else { @@ -4554,6 +4132,7 @@ func (_m *Proxy) UpdateCredentialCache(ctx context.Context, request *proxypb.Upd } } + var r1 error if rf, ok := ret.Get(1).(func(context.Context, *proxypb.UpdateCredCacheRequest) error); ok { r1 = rf(ctx, request) } else { @@ -4569,8 +4148,8 @@ type Proxy_UpdateCredentialCache_Call struct { } // UpdateCredentialCache is a helper method to define mock.On call -// - ctx context.Context -// - request *proxypb.UpdateCredCacheRequest +// - ctx context.Context +// - request *proxypb.UpdateCredCacheRequest func (_e *Proxy_Expecter) UpdateCredentialCache(ctx interface{}, request interface{}) *Proxy_UpdateCredentialCache_Call { return &Proxy_UpdateCredentialCache_Call{Call: _e.mock.On("UpdateCredentialCache", ctx, request)} } @@ -4587,11 +4166,6 @@ func (_c *Proxy_UpdateCredentialCache_Call) Return(_a0 *commonpb.Status, _a1 err return _c } -func (_c *Proxy_UpdateCredentialCache_Call) RunAndReturn(run func(context.Context, *proxypb.UpdateCredCacheRequest) (*commonpb.Status, error)) *Proxy_UpdateCredentialCache_Call { - _c.Call.Return(run) - return _c -} - // UpdateStateCode provides a mock function with given fields: stateCode func (_m *Proxy) UpdateStateCode(stateCode commonpb.StateCode) { _m.Called(stateCode) @@ -4603,7 +4177,7 @@ type Proxy_UpdateStateCode_Call struct { } // UpdateStateCode is a helper method to define mock.On call -// - stateCode commonpb.StateCode +// - stateCode commonpb.StateCode func (_e *Proxy_Expecter) UpdateStateCode(stateCode interface{}) *Proxy_UpdateStateCode_Call { return &Proxy_UpdateStateCode_Call{Call: _e.mock.On("UpdateStateCode", stateCode)} } @@ -4620,11 +4194,6 @@ func (_c *Proxy_UpdateStateCode_Call) Return() *Proxy_UpdateStateCode_Call { return _c } -func (_c *Proxy_UpdateStateCode_Call) RunAndReturn(run func(commonpb.StateCode)) *Proxy_UpdateStateCode_Call { - _c.Call.Return(run) - return _c -} - type mockConstructorTestingTNewProxy interface { mock.TestingT Cleanup(func()) diff --git a/internal/proto/proxy.proto b/internal/proto/proxy.proto index 1255344d5a..9c443995e0 100644 --- a/internal/proto/proxy.proto +++ b/internal/proto/proxy.proto @@ -20,6 +20,8 @@ service Proxy { rpc RefreshPolicyInfoCache(RefreshPolicyInfoCacheRequest) returns (common.Status) {} rpc GetProxyMetrics(milvus.GetMetricsRequest) returns (milvus.GetMetricsResponse) {} rpc SetRates(SetRatesRequest) returns (common.Status) {} + + rpc ListClientInfos(ListClientInfosRequest) returns (ListClientInfosResponse) {} } message InvalidateCollMetaCacheRequest { @@ -61,3 +63,12 @@ message SetRatesRequest { common.MsgBase base = 1; repeated CollectionRate rates = 2; } + +message ListClientInfosRequest { + common.MsgBase base = 1; +} + +message ListClientInfosResponse { + common.Status status = 1; + repeated common.ClientInfo client_infos = 2; +} diff --git a/internal/proto/proxypb/proxy.pb.go b/internal/proto/proxypb/proxy.pb.go index 8358949ea7..9a769c7828 100644 --- a/internal/proto/proxypb/proxy.pb.go +++ b/internal/proto/proxypb/proxy.pb.go @@ -361,6 +361,92 @@ func (m *SetRatesRequest) GetRates() []*CollectionRate { return nil } +type ListClientInfosRequest struct { + Base *commonpb.MsgBase `protobuf:"bytes,1,opt,name=base,proto3" json:"base,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListClientInfosRequest) Reset() { *m = ListClientInfosRequest{} } +func (m *ListClientInfosRequest) String() string { return proto.CompactTextString(m) } +func (*ListClientInfosRequest) ProtoMessage() {} +func (*ListClientInfosRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_700b50b08ed8dbaf, []int{6} +} + +func (m *ListClientInfosRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListClientInfosRequest.Unmarshal(m, b) +} +func (m *ListClientInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListClientInfosRequest.Marshal(b, m, deterministic) +} +func (m *ListClientInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListClientInfosRequest.Merge(m, src) +} +func (m *ListClientInfosRequest) XXX_Size() int { + return xxx_messageInfo_ListClientInfosRequest.Size(m) +} +func (m *ListClientInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListClientInfosRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListClientInfosRequest proto.InternalMessageInfo + +func (m *ListClientInfosRequest) GetBase() *commonpb.MsgBase { + if m != nil { + return m.Base + } + return nil +} + +type ListClientInfosResponse struct { + Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` + ClientInfos []*commonpb.ClientInfo `protobuf:"bytes,2,rep,name=client_infos,json=clientInfos,proto3" json:"client_infos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListClientInfosResponse) Reset() { *m = ListClientInfosResponse{} } +func (m *ListClientInfosResponse) String() string { return proto.CompactTextString(m) } +func (*ListClientInfosResponse) ProtoMessage() {} +func (*ListClientInfosResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_700b50b08ed8dbaf, []int{7} +} + +func (m *ListClientInfosResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListClientInfosResponse.Unmarshal(m, b) +} +func (m *ListClientInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListClientInfosResponse.Marshal(b, m, deterministic) +} +func (m *ListClientInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListClientInfosResponse.Merge(m, src) +} +func (m *ListClientInfosResponse) XXX_Size() int { + return xxx_messageInfo_ListClientInfosResponse.Size(m) +} +func (m *ListClientInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListClientInfosResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListClientInfosResponse proto.InternalMessageInfo + +func (m *ListClientInfosResponse) GetStatus() *commonpb.Status { + if m != nil { + return m.Status + } + return nil +} + +func (m *ListClientInfosResponse) GetClientInfos() []*commonpb.ClientInfo { + if m != nil { + return m.ClientInfos + } + return nil +} + func init() { proto.RegisterType((*InvalidateCollMetaCacheRequest)(nil), "milvus.proto.proxy.InvalidateCollMetaCacheRequest") proto.RegisterType((*InvalidateCredCacheRequest)(nil), "milvus.proto.proxy.InvalidateCredCacheRequest") @@ -368,54 +454,60 @@ func init() { proto.RegisterType((*RefreshPolicyInfoCacheRequest)(nil), "milvus.proto.proxy.RefreshPolicyInfoCacheRequest") proto.RegisterType((*CollectionRate)(nil), "milvus.proto.proxy.CollectionRate") proto.RegisterType((*SetRatesRequest)(nil), "milvus.proto.proxy.SetRatesRequest") + proto.RegisterType((*ListClientInfosRequest)(nil), "milvus.proto.proxy.ListClientInfosRequest") + proto.RegisterType((*ListClientInfosResponse)(nil), "milvus.proto.proxy.ListClientInfosResponse") } func init() { proto.RegisterFile("proxy.proto", fileDescriptor_700b50b08ed8dbaf) } var fileDescriptor_700b50b08ed8dbaf = []byte{ - // 657 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xd1, 0x4e, 0x13, 0x41, - 0x14, 0x65, 0x29, 0x2d, 0x78, 0x69, 0x4a, 0x32, 0x41, 0xac, 0x45, 0xb0, 0x59, 0x8c, 0x34, 0x24, - 0x6e, 0xa5, 0x92, 0xe8, 0x33, 0xc5, 0x34, 0xc4, 0x40, 0x70, 0xab, 0x2f, 0xbe, 0x98, 0xd9, 0xdd, - 0x0b, 0x5d, 0xb2, 0x9d, 0x59, 0x66, 0xa6, 0x68, 0x1f, 0x8c, 0x89, 0x7f, 0xe4, 0x9b, 0xdf, 0xe1, - 0x17, 0x99, 0xdd, 0xd9, 0x6e, 0xbb, 0x65, 0x61, 0xa3, 0xc4, 0xb7, 0xde, 0x99, 0x73, 0x7b, 0xce, - 0xb9, 0x77, 0xf6, 0xc0, 0x6a, 0x28, 0xf8, 0xd7, 0xb1, 0x15, 0x0a, 0xae, 0x38, 0x21, 0x43, 0x3f, - 0xb8, 0x1e, 0x49, 0x5d, 0x59, 0xf1, 0x4d, 0xa3, 0xea, 0xf2, 0xe1, 0x90, 0x33, 0x7d, 0xd6, 0xa8, - 0xf9, 0x4c, 0xa1, 0x60, 0x34, 0x48, 0xea, 0xea, 0x6c, 0x87, 0xf9, 0xcb, 0x80, 0xed, 0x63, 0x76, - 0x4d, 0x03, 0xdf, 0xa3, 0x0a, 0xbb, 0x3c, 0x08, 0x4e, 0x50, 0xd1, 0x2e, 0x75, 0x07, 0x68, 0xe3, - 0xd5, 0x08, 0xa5, 0x22, 0x2f, 0x61, 0xc9, 0xa1, 0x12, 0xeb, 0x46, 0xd3, 0x68, 0xad, 0x76, 0x9e, - 0x58, 0x19, 0xc6, 0x84, 0xea, 0x44, 0x5e, 0x1c, 0x52, 0x89, 0x76, 0x8c, 0x24, 0x8f, 0x60, 0xd9, - 0x73, 0x3e, 0x33, 0x3a, 0xc4, 0xfa, 0x62, 0xd3, 0x68, 0x3d, 0xb0, 0x2b, 0x9e, 0x73, 0x4a, 0x87, - 0x48, 0x76, 0x61, 0xcd, 0xe5, 0x41, 0x80, 0xae, 0xf2, 0x39, 0xd3, 0x80, 0x52, 0x0c, 0xa8, 0x4d, - 0x8f, 0x63, 0xa0, 0x09, 0xd5, 0xe9, 0xc9, 0xf1, 0x51, 0x7d, 0xa9, 0x69, 0xb4, 0x4a, 0x76, 0xe6, - 0xcc, 0xbc, 0x84, 0xc6, 0x8c, 0x72, 0x81, 0xde, 0x3d, 0x55, 0x37, 0x60, 0x65, 0x24, 0xa3, 0x49, - 0xa5, 0xb2, 0xd3, 0xda, 0xfc, 0x61, 0xc0, 0xc6, 0xc7, 0xf0, 0xff, 0x13, 0x45, 0x77, 0x21, 0x95, - 0xf2, 0x0b, 0x17, 0x5e, 0x32, 0x9a, 0xb4, 0x36, 0xbf, 0xc3, 0x96, 0x8d, 0xe7, 0x02, 0xe5, 0xe0, - 0x8c, 0x07, 0xbe, 0x3b, 0x3e, 0x66, 0xe7, 0xfc, 0x9e, 0x52, 0x36, 0xa0, 0xc2, 0xc3, 0x0f, 0xe3, - 0x50, 0x0b, 0x29, 0xdb, 0x49, 0x45, 0xd6, 0xa1, 0xcc, 0xc3, 0x77, 0x38, 0x4e, 0x34, 0xe8, 0xc2, - 0xfc, 0x6d, 0x40, 0xad, 0x9b, 0xae, 0xc0, 0xa6, 0x0a, 0xc9, 0x36, 0xc0, 0x74, 0x29, 0x31, 0x71, - 0xc9, 0x9e, 0x39, 0x21, 0xfb, 0x50, 0x16, 0x54, 0xa1, 0xac, 0x2f, 0x36, 0x4b, 0xad, 0xd5, 0xce, - 0x66, 0x56, 0x53, 0xfa, 0x34, 0xa3, 0xff, 0xb2, 0x35, 0x92, 0xbc, 0x86, 0x8a, 0x54, 0x71, 0x4f, - 0xa9, 0x59, 0x6a, 0xd5, 0x3a, 0x4f, 0xb3, 0x3d, 0x49, 0xf1, 0x7e, 0xc4, 0x15, 0xed, 0x47, 0x38, - 0x3b, 0x81, 0x93, 0x03, 0x28, 0xbb, 0xdc, 0x43, 0x59, 0x5f, 0x8a, 0xfb, 0xb6, 0x73, 0xfd, 0xbf, - 0x15, 0x82, 0x8b, 0x2e, 0xf7, 0xd0, 0xd6, 0x60, 0xf3, 0x1b, 0xac, 0xf5, 0x51, 0x45, 0x02, 0xe4, - 0xbf, 0xcf, 0xf1, 0x4d, 0xd6, 0xa6, 0x69, 0xdd, 0xfc, 0x2c, 0xad, 0xec, 0xe4, 0x12, 0xb7, 0x9d, - 0x9f, 0xcb, 0x50, 0x3e, 0x8b, 0xee, 0x49, 0x00, 0xa4, 0x87, 0xaa, 0xcb, 0x87, 0x21, 0x67, 0xc8, - 0x54, 0x5f, 0x9b, 0xb2, 0x72, 0xdd, 0xdf, 0x04, 0x26, 0xda, 0x1b, 0xcf, 0x72, 0xf1, 0x73, 0x60, - 0x73, 0x81, 0x5c, 0xc1, 0x7a, 0x0f, 0xe3, 0xd2, 0x97, 0xca, 0x77, 0x65, 0x77, 0x40, 0x19, 0xc3, - 0x80, 0x74, 0x6e, 0xd9, 0x50, 0x1e, 0x78, 0xc2, 0xb9, 0x93, 0xcb, 0xd9, 0x57, 0xc2, 0x67, 0x17, - 0x36, 0xca, 0x90, 0x33, 0x89, 0xe6, 0x02, 0x11, 0xb0, 0x95, 0x8d, 0x1a, 0x3d, 0x8d, 0x34, 0x70, - 0xe6, 0xb9, 0xf5, 0xd8, 0xee, 0x4e, 0xa7, 0xc6, 0x66, 0xee, 0x76, 0x22, 0xa9, 0xa3, 0xc8, 0x26, - 0x85, 0x6a, 0x0f, 0xd5, 0x91, 0x37, 0xb1, 0xb7, 0x77, 0xbb, 0xbd, 0x14, 0xf4, 0x97, 0xb6, 0x2e, - 0xe1, 0x71, 0x36, 0x87, 0x90, 0x29, 0x9f, 0x06, 0xda, 0x92, 0x55, 0x60, 0x69, 0x2e, 0x4d, 0x8a, - 0xec, 0x38, 0xf0, 0x70, 0x1a, 0x43, 0xb3, 0x3c, 0x7b, 0x79, 0x3c, 0xf9, 0x89, 0x55, 0xc4, 0x71, - 0x09, 0x1b, 0xf9, 0x31, 0x43, 0xf6, 0xf3, 0x48, 0xee, 0x8c, 0xa4, 0x22, 0x2e, 0x0f, 0xd6, 0x7a, - 0xa8, 0xe2, 0xf7, 0x7f, 0x82, 0x4a, 0xf8, 0xae, 0x24, 0xcf, 0x6f, 0x7b, 0xf0, 0x09, 0x60, 0xf2, - 0xcf, 0xbb, 0x85, 0xb8, 0x74, 0x43, 0xa7, 0xb0, 0x32, 0xf9, 0xc4, 0xc9, 0x4e, 0x9e, 0x87, 0xb9, - 0x00, 0x28, 0x50, 0x7d, 0x78, 0xf0, 0xa9, 0x73, 0xe1, 0xab, 0xc1, 0xc8, 0x89, 0x6e, 0xda, 0x1a, - 0xfa, 0xc2, 0xe7, 0xc9, 0xaf, 0xf6, 0xe4, 0x51, 0xb5, 0xe3, 0xee, 0x76, 0x4c, 0x11, 0x3a, 0x4e, - 0x25, 0x2e, 0x5f, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xf6, 0x3d, 0x98, 0xc0, 0x07, 0x00, - 0x00, + // 735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xdd, 0x4e, 0x1a, 0x5b, + 0x14, 0x76, 0x44, 0x38, 0x9e, 0x05, 0x81, 0x64, 0xc7, 0x83, 0x1c, 0x3c, 0x2a, 0x19, 0x4f, 0x2a, + 0xb1, 0x29, 0x54, 0x34, 0x69, 0xaf, 0xc5, 0x86, 0xd8, 0x56, 0x63, 0x87, 0xf6, 0xa6, 0x37, 0x66, + 0x33, 0xb3, 0x94, 0x6d, 0x86, 0xbd, 0xc7, 0xd9, 0x1b, 0x5b, 0x2e, 0x9a, 0x26, 0x7d, 0x84, 0xbe, + 0x40, 0x5f, 0xa3, 0xcf, 0xd1, 0x27, 0x6a, 0xe6, 0x87, 0x81, 0xc1, 0xad, 0xb4, 0x9a, 0xde, 0xb1, + 0xf6, 0x7c, 0x6b, 0x7d, 0xdf, 0xfa, 0xe1, 0x83, 0xbc, 0xe7, 0x8b, 0x8f, 0xa3, 0x86, 0xe7, 0x0b, + 0x25, 0x08, 0x19, 0x30, 0xf7, 0x7a, 0x28, 0xa3, 0xa8, 0x11, 0x7e, 0xa9, 0x16, 0x6c, 0x31, 0x18, + 0x08, 0x1e, 0xbd, 0x55, 0x8b, 0x8c, 0x2b, 0xf4, 0x39, 0x75, 0xe3, 0xb8, 0x30, 0x9d, 0x61, 0x7e, + 0x37, 0x60, 0xe3, 0x88, 0x5f, 0x53, 0x97, 0x39, 0x54, 0x61, 0x5b, 0xb8, 0xee, 0x31, 0x2a, 0xda, + 0xa6, 0x76, 0x1f, 0x2d, 0xbc, 0x1a, 0xa2, 0x54, 0xe4, 0x29, 0x2c, 0xf5, 0xa8, 0xc4, 0x8a, 0x51, + 0x33, 0xea, 0xf9, 0xd6, 0x7f, 0x8d, 0x14, 0x63, 0x4c, 0x75, 0x2c, 0x2f, 0x0e, 0xa8, 0x44, 0x2b, + 0x44, 0x92, 0x55, 0xf8, 0xcb, 0xe9, 0x9d, 0x71, 0x3a, 0xc0, 0xca, 0x62, 0xcd, 0xa8, 0xff, 0x6d, + 0xe5, 0x9c, 0xde, 0x09, 0x1d, 0x20, 0xd9, 0x86, 0x92, 0x2d, 0x5c, 0x17, 0x6d, 0xc5, 0x04, 0x8f, + 0x00, 0x99, 0x10, 0x50, 0x9c, 0x3c, 0x87, 0x40, 0x13, 0x0a, 0x93, 0x97, 0xa3, 0xc3, 0xca, 0x52, + 0xcd, 0xa8, 0x67, 0xac, 0xd4, 0x9b, 0x79, 0x09, 0xd5, 0x29, 0xe5, 0x3e, 0x3a, 0x0f, 0x54, 0x5d, + 0x85, 0xe5, 0xa1, 0x0c, 0x26, 0x95, 0xc8, 0x4e, 0x62, 0xf3, 0x8b, 0x01, 0xe5, 0x77, 0xde, 0x9f, + 0x27, 0x0a, 0xbe, 0x79, 0x54, 0xca, 0x0f, 0xc2, 0x77, 0xe2, 0xd1, 0x24, 0xb1, 0xf9, 0x19, 0xd6, + 0x2d, 0x3c, 0xf7, 0x51, 0xf6, 0x4f, 0x85, 0xcb, 0xec, 0xd1, 0x11, 0x3f, 0x17, 0x0f, 0x94, 0x52, + 0x86, 0x9c, 0xf0, 0xde, 0x8e, 0xbc, 0x48, 0x48, 0xd6, 0x8a, 0x23, 0xb2, 0x02, 0x59, 0xe1, 0xbd, + 0xc2, 0x51, 0xac, 0x21, 0x0a, 0xcc, 0x1f, 0x06, 0x14, 0xdb, 0xc9, 0x0a, 0x2c, 0xaa, 0x90, 0x6c, + 0x00, 0x4c, 0x96, 0x12, 0x12, 0x67, 0xac, 0xa9, 0x17, 0xb2, 0x0b, 0x59, 0x9f, 0x2a, 0x94, 0x95, + 0xc5, 0x5a, 0xa6, 0x9e, 0x6f, 0xad, 0xa5, 0x35, 0x25, 0xa7, 0x19, 0xd4, 0xb2, 0x22, 0x24, 0x79, + 0x06, 0x39, 0xa9, 0xc2, 0x9c, 0x4c, 0x2d, 0x53, 0x2f, 0xb6, 0x36, 0xd3, 0x39, 0x71, 0xf0, 0x66, + 0x28, 0x14, 0xed, 0x06, 0x38, 0x2b, 0x86, 0x93, 0x7d, 0xc8, 0xda, 0xc2, 0x41, 0x59, 0x59, 0x0a, + 0xf3, 0x36, 0xb4, 0xfd, 0xbf, 0xf0, 0x7d, 0xe1, 0xb7, 0x85, 0x83, 0x56, 0x04, 0x36, 0x3f, 0x41, + 0xa9, 0x8b, 0x2a, 0x10, 0x20, 0xef, 0x3f, 0xc7, 0xe7, 0xe9, 0x36, 0xcd, 0xc6, 0xcd, 0xbf, 0x65, + 0x23, 0x3d, 0xb9, 0xb8, 0x5b, 0xf3, 0x25, 0x94, 0x5f, 0x33, 0xa9, 0xda, 0x2e, 0x43, 0xae, 0x82, + 0x8d, 0xde, 0x5f, 0x85, 0xf9, 0xd5, 0x80, 0xd5, 0x1b, 0xc5, 0xa4, 0x27, 0xb8, 0x44, 0xb2, 0x17, + 0x4d, 0x75, 0x28, 0xe3, 0x7a, 0x6b, 0xda, 0x7a, 0xdd, 0x10, 0x62, 0xc5, 0x50, 0x72, 0x00, 0x05, + 0x3b, 0xac, 0x75, 0xc6, 0x82, 0x62, 0x71, 0x77, 0x9b, 0xda, 0xd4, 0x09, 0xa9, 0x95, 0xb7, 0x27, + 0x02, 0x5a, 0xdf, 0x96, 0x21, 0x7b, 0x1a, 0x0c, 0x80, 0xb8, 0x40, 0x3a, 0xa8, 0xda, 0x62, 0xe0, + 0x09, 0x8e, 0x5c, 0x75, 0xa3, 0xad, 0x35, 0xb4, 0xeb, 0xbd, 0x09, 0x8c, 0xc7, 0x52, 0xfd, 0x5f, + 0x8b, 0x9f, 0x01, 0x9b, 0x0b, 0xe4, 0x0a, 0x56, 0x3a, 0x18, 0x86, 0x4c, 0x2a, 0x66, 0xcb, 0x76, + 0x9f, 0x72, 0x8e, 0x2e, 0x69, 0xdd, 0x72, 0x82, 0x3a, 0xf0, 0x98, 0x73, 0x4b, 0xcb, 0xd9, 0x55, + 0x3e, 0xe3, 0x17, 0xe3, 0x09, 0x9b, 0x0b, 0xc4, 0x87, 0xf5, 0xb4, 0x97, 0x46, 0xeb, 0x4e, 0x1c, + 0x75, 0x96, 0x3b, 0xba, 0x8b, 0xbb, 0xed, 0xb7, 0x7a, 0xd7, 0xa2, 0xcc, 0x05, 0x42, 0xa1, 0xd0, + 0x41, 0x75, 0xe8, 0x8c, 0xdb, 0xdb, 0xb9, 0xbd, 0xbd, 0x04, 0xf4, 0x9b, 0x6d, 0x5d, 0xc2, 0xbf, + 0x69, 0xa3, 0x45, 0xae, 0x18, 0x75, 0xa3, 0x96, 0x1a, 0x73, 0x5a, 0x9a, 0xb1, 0xcb, 0x79, 0xed, + 0xf4, 0xe0, 0x9f, 0x89, 0xcf, 0x4e, 0xf3, 0xec, 0xe8, 0x78, 0xf4, 0x96, 0x3c, 0x8f, 0xe3, 0x12, + 0xca, 0x7a, 0x1f, 0x25, 0xbb, 0x3a, 0x92, 0x3b, 0x3d, 0x77, 0x1e, 0x97, 0x03, 0xa5, 0x0e, 0xaa, + 0xf0, 0xfe, 0x8f, 0x51, 0xf9, 0xcc, 0x96, 0xe4, 0xd1, 0x6d, 0x07, 0x1f, 0x03, 0xc6, 0x95, 0xb7, + 0xe7, 0xe2, 0x92, 0x0d, 0x9d, 0xc0, 0xf2, 0xd8, 0xc3, 0xc8, 0x96, 0xae, 0x87, 0x19, 0x87, 0x9b, + 0xa7, 0xda, 0x85, 0xd2, 0x8c, 0x8f, 0xe8, 0xe7, 0xaf, 0x77, 0xae, 0xea, 0xe3, 0x5f, 0xc2, 0x8e, + 0xd5, 0x1f, 0xec, 0xbf, 0x6f, 0x5d, 0x30, 0xd5, 0x1f, 0xf6, 0x02, 0x1d, 0xcd, 0x28, 0xf5, 0x09, + 0x13, 0xf1, 0xaf, 0xe6, 0xf8, 0x84, 0x9b, 0x61, 0xb5, 0x66, 0x58, 0xcd, 0xeb, 0xf5, 0x72, 0x61, + 0xb8, 0xf7, 0x33, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x7a, 0xad, 0xdf, 0x0f, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -439,6 +531,7 @@ type ProxyClient interface { RefreshPolicyInfoCache(ctx context.Context, in *RefreshPolicyInfoCacheRequest, opts ...grpc.CallOption) (*commonpb.Status, error) GetProxyMetrics(ctx context.Context, in *milvuspb.GetMetricsRequest, opts ...grpc.CallOption) (*milvuspb.GetMetricsResponse, error) SetRates(ctx context.Context, in *SetRatesRequest, opts ...grpc.CallOption) (*commonpb.Status, error) + ListClientInfos(ctx context.Context, in *ListClientInfosRequest, opts ...grpc.CallOption) (*ListClientInfosResponse, error) } type proxyClient struct { @@ -530,6 +623,15 @@ func (c *proxyClient) SetRates(ctx context.Context, in *SetRatesRequest, opts .. return out, nil } +func (c *proxyClient) ListClientInfos(ctx context.Context, in *ListClientInfosRequest, opts ...grpc.CallOption) (*ListClientInfosResponse, error) { + out := new(ListClientInfosResponse) + err := c.cc.Invoke(ctx, "/milvus.proto.proxy.Proxy/ListClientInfos", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ProxyServer is the server API for Proxy service. type ProxyServer interface { GetComponentStates(context.Context, *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error) @@ -541,6 +643,7 @@ type ProxyServer interface { RefreshPolicyInfoCache(context.Context, *RefreshPolicyInfoCacheRequest) (*commonpb.Status, error) GetProxyMetrics(context.Context, *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) SetRates(context.Context, *SetRatesRequest) (*commonpb.Status, error) + ListClientInfos(context.Context, *ListClientInfosRequest) (*ListClientInfosResponse, error) } // UnimplementedProxyServer can be embedded to have forward compatible implementations. @@ -574,6 +677,9 @@ func (*UnimplementedProxyServer) GetProxyMetrics(ctx context.Context, req *milvu func (*UnimplementedProxyServer) SetRates(ctx context.Context, req *SetRatesRequest) (*commonpb.Status, error) { return nil, status.Errorf(codes.Unimplemented, "method SetRates not implemented") } +func (*UnimplementedProxyServer) ListClientInfos(ctx context.Context, req *ListClientInfosRequest) (*ListClientInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListClientInfos not implemented") +} func RegisterProxyServer(s *grpc.Server, srv ProxyServer) { s.RegisterService(&_Proxy_serviceDesc, srv) @@ -741,6 +847,24 @@ func _Proxy_SetRates_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Proxy_ListClientInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListClientInfosRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProxyServer).ListClientInfos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/milvus.proto.proxy.Proxy/ListClientInfos", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProxyServer).ListClientInfos(ctx, req.(*ListClientInfosRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Proxy_serviceDesc = grpc.ServiceDesc{ ServiceName: "milvus.proto.proxy.Proxy", HandlerType: (*ProxyServer)(nil), @@ -781,6 +905,10 @@ var _Proxy_serviceDesc = grpc.ServiceDesc{ MethodName: "SetRates", Handler: _Proxy_SetRates_Handler, }, + { + MethodName: "ListClientInfos", + Handler: _Proxy_ListClientInfos_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "proxy.proto", diff --git a/internal/proxy/client_info.go b/internal/proxy/client_info.go new file mode 100644 index 0000000000..4e4f057cfe --- /dev/null +++ b/internal/proxy/client_info.go @@ -0,0 +1,49 @@ +package proxy + +import ( + "context" + "time" + + "github.com/milvus-io/milvus-proto/go-api/commonpb" + "github.com/milvus-io/milvus/internal/log" + "go.uber.org/zap" +) + +type clientInfo struct { + *commonpb.ClientInfo + identifier int64 + lastActiveTime time.Time +} + +func getLoggerOfClientInfo(info *commonpb.ClientInfo) []zap.Field { + fields := []zap.Field{ + zap.String("sdk_type", info.GetSdkType()), + zap.String("sdk_version", info.GetSdkVersion()), + zap.String("local_time", info.GetLocalTime()), + zap.String("user", info.GetUser()), + zap.String("host", info.GetHost()), + } + + for k, v := range info.GetReserved() { + fields = append(fields, zap.String(k, v)) + } + + return fields +} + +func (c clientInfo) getLogger() []zap.Field { + fields := getLoggerOfClientInfo(c.ClientInfo) + fields = append(fields, + zap.Int64("identifier", c.identifier), + zap.Time("last_active_time", c.lastActiveTime), + ) + return fields +} + +func (c clientInfo) ctxLogRegister(ctx context.Context) { + log.Ctx(ctx).Info("client register", c.getLogger()...) +} + +func (c clientInfo) logDeregister() { + log.Info("client deregister", c.getLogger()...) +} diff --git a/internal/proxy/connection_manager.go b/internal/proxy/connection_manager.go new file mode 100644 index 0000000000..2005c4be1c --- /dev/null +++ b/internal/proxy/connection_manager.go @@ -0,0 +1,178 @@ +package proxy + +import ( + "context" + "strconv" + "sync" + "time" + + "github.com/golang/protobuf/proto" + "github.com/milvus-io/milvus-proto/go-api/commonpb" + "github.com/milvus-io/milvus/internal/log" +) + +const ( + // we shouldn't check this too frequently. + defaultConnCheckDuration = 2 * time.Minute + defaultTTLForInactiveConn = 24 * time.Hour +) + +type connectionManager struct { + mu sync.RWMutex + + initOnce sync.Once + stopOnce sync.Once + + closeSignal chan struct{} + wg sync.WaitGroup + + buffer chan int64 + duration time.Duration + ttl time.Duration + + clientInfos map[int64]clientInfo +} + +type connectionManagerOption func(s *connectionManager) + +func withDuration(duration time.Duration) connectionManagerOption { + return func(s *connectionManager) { + s.duration = duration + } +} + +func withTTL(ttl time.Duration) connectionManagerOption { + return func(s *connectionManager) { + s.ttl = ttl + } +} + +func (s *connectionManager) apply(opts ...connectionManagerOption) { + for _, opt := range opts { + opt(s) + } +} + +func (s *connectionManager) init() { + s.initOnce.Do(func() { + s.wg.Add(1) + go s.checkLoop() + }) +} + +func (s *connectionManager) stop() { + s.stopOnce.Do(func() { + close(s.closeSignal) + s.wg.Wait() + }) +} + +func (s *connectionManager) checkLoop() { + defer s.wg.Done() + + t := time.NewTicker(s.duration) + defer t.Stop() + + for { + select { + case <-s.closeSignal: + log.Info("connection manager closed") + return + case identifier := <-s.buffer: + s.update(identifier) + case <-t.C: + s.removeLongInactiveClients() + } + } +} + +func (s *connectionManager) register(ctx context.Context, identifier int64, info *commonpb.ClientInfo) { + cli := clientInfo{ + ClientInfo: info, + identifier: identifier, + lastActiveTime: time.Now(), + } + + s.mu.Lock() + defer s.mu.Unlock() + + s.clientInfos[identifier] = cli + cli.ctxLogRegister(ctx) +} + +func (s *connectionManager) keepActive(identifier int64) { + // make this asynchronous and then the rpc won't be blocked too long. + s.buffer <- identifier +} + +func (s *connectionManager) update(identifier int64) { + s.mu.Lock() + defer s.mu.Unlock() + + cli, ok := s.clientInfos[identifier] + if ok { + cli.lastActiveTime = time.Now() + s.clientInfos[identifier] = cli + } +} + +func (s *connectionManager) removeLongInactiveClients() { + s.mu.Lock() + defer s.mu.Unlock() + + for candidate, cli := range s.clientInfos { + if time.Since(cli.lastActiveTime) > s.ttl { + cli.logDeregister() + delete(s.clientInfos, candidate) + } + } +} + +func (s *connectionManager) list() []*commonpb.ClientInfo { + s.mu.RLock() + defer s.mu.RUnlock() + + clients := make([]*commonpb.ClientInfo, 0, len(s.clientInfos)) + + for identifier, cli := range s.clientInfos { + if cli.ClientInfo != nil { + client := proto.Clone(cli.ClientInfo).(*commonpb.ClientInfo) + if client.Reserved == nil { + client.Reserved = make(map[string]string) + } + client.Reserved["identifier"] = string(strconv.AppendInt(nil, identifier, 10)) + client.Reserved["last_active_time"] = cli.lastActiveTime.String() + + clients = append(clients, client) + } + } + + return clients +} + +func newConnectionManager(opts ...connectionManagerOption) *connectionManager { + s := &connectionManager{ + closeSignal: make(chan struct{}, 1), + buffer: make(chan int64, 64), + duration: defaultConnCheckDuration, + ttl: defaultTTLForInactiveConn, + clientInfos: make(map[int64]clientInfo), + } + s.apply(opts...) + s.init() + + return s +} + +var connectionManagerInstance *connectionManager + +var getConnectionManagerInstanceOnce sync.Once + +func GetConnectionManager() *connectionManager { + getConnectionManagerInstanceOnce.Do(func() { + connectionManagerInstance = newConnectionManager( + withDuration(defaultConnCheckDuration), + withTTL(defaultTTLForInactiveConn)) + }) + return connectionManagerInstance +} diff --git a/internal/proxy/connection_manager_test.go b/internal/proxy/connection_manager_test.go new file mode 100644 index 0000000000..3edb59c09b --- /dev/null +++ b/internal/proxy/connection_manager_test.go @@ -0,0 +1,68 @@ +package proxy + +import ( + "context" + "testing" + "time" + + "github.com/milvus-io/milvus-proto/go-api/commonpb" + "github.com/stretchr/testify/assert" +) + +func Test_withDuration(t *testing.T) { + s := &connectionManager{} + s.apply(withDuration(defaultConnCheckDuration)) + assert.Equal(t, defaultConnCheckDuration, s.duration) +} + +func Test_withTTL(t *testing.T) { + s := &connectionManager{} + s.apply(withTTL(defaultTTLForInactiveConn)) + assert.Equal(t, defaultTTLForInactiveConn, s.ttl) +} + +func Test_connectionManager_apply(t *testing.T) { + s := &connectionManager{} + s.apply( + withDuration(defaultConnCheckDuration), + withTTL(defaultTTLForInactiveConn)) + assert.Equal(t, defaultConnCheckDuration, s.duration) + assert.Equal(t, defaultTTLForInactiveConn, s.ttl) +} + +func TestGetConnectionManager(t *testing.T) { + s := GetConnectionManager() + assert.Equal(t, defaultConnCheckDuration, s.duration) + assert.Equal(t, defaultTTLForInactiveConn, s.ttl) +} + +func TestConnectionManager(t *testing.T) { + s := newConnectionManager( + withDuration(time.Millisecond*5), + withTTL(time.Millisecond*100)) + + s.register(context.TODO(), 1, &commonpb.ClientInfo{ + Reserved: map[string]string{"for_test": "for_test"}, + }) + assert.Equal(t, 1, len(s.list())) + + // register duplicate. + s.register(context.TODO(), 1, &commonpb.ClientInfo{}) + assert.Equal(t, 1, len(s.list())) + + s.register(context.TODO(), 2, &commonpb.ClientInfo{}) + assert.Equal(t, 2, len(s.list())) + + s.keepActive(1) + s.keepActive(2) + + time.Sleep(time.Millisecond * 5) + assert.Equal(t, 2, len(s.list())) + + time.Sleep(time.Millisecond * 100) + assert.Equal(t, 0, len(s.list())) + + s.stop() + + time.Sleep(time.Millisecond * 5) +} diff --git a/internal/proxy/impl.go b/internal/proxy/impl.go index 06ce7d6315..b59a061286 100644 --- a/internal/proxy/impl.go +++ b/internal/proxy/impl.go @@ -5478,3 +5478,49 @@ func (node *Proxy) DescribeResourceGroup(ctx context.Context, request *milvuspb. metrics.ProxyReqLatency.WithLabelValues(strconv.FormatInt(Params.QueryCoordCfg.GetNodeID(), 10), method).Observe(float64(tr.ElapseSpan().Milliseconds())) return t.result, nil } + +func (node *Proxy) Connect(ctx context.Context, request *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) { + if !node.checkHealthy() { + return &milvuspb.ConnectResponse{Status: unhealthyStatus()}, nil + } + + ts, err := node.tsoAllocator.AllocOne(ctx) + if err != nil { + return &milvuspb.ConnectResponse{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_UnexpectedError, + Reason: err.Error(), + }, + }, nil + } + + serverInfo := &commonpb.ServerInfo{ + BuildTags: os.Getenv(metricsinfo.GitBuildTagsEnvKey), + BuildTime: os.Getenv(metricsinfo.MilvusBuildTimeEnvKey), + GitCommit: os.Getenv(metricsinfo.GitCommitEnvKey), + GoVersion: os.Getenv(metricsinfo.MilvusUsedGoVersion), + DeployMode: os.Getenv(metricsinfo.DeployModeEnvKey), + Reserved: make(map[string]string), + } + + GetConnectionManager().register(ctx, int64(ts), request.GetClientInfo()) + + return &milvuspb.ConnectResponse{ + Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, + ServerInfo: serverInfo, + Identifier: int64(ts), + }, nil +} + +func (node *Proxy) ListClientInfos(ctx context.Context, req *proxypb.ListClientInfosRequest) (*proxypb.ListClientInfosResponse, error) { + if !node.checkHealthy() { + return &proxypb.ListClientInfosResponse{Status: unhealthyStatus()}, nil + } + + clients := GetConnectionManager().list() + + return &proxypb.ListClientInfosResponse{ + Status: &commonpb.Status{ErrorCode: commonpb.ErrorCode_Success}, + ClientInfos: clients, + }, nil +} diff --git a/internal/proxy/impl_test.go b/internal/proxy/impl_test.go index 624540ac9d..1473ba5770 100644 --- a/internal/proxy/impl_test.go +++ b/internal/proxy/impl_test.go @@ -30,6 +30,7 @@ import ( "github.com/milvus-io/milvus/internal/mocks" "github.com/milvus-io/milvus/internal/proto/datapb" "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/dependency" "github.com/milvus-io/milvus/internal/util/sessionutil" @@ -722,3 +723,75 @@ func TestProxyListDatabase(t *testing.T) { assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) }) } + +func TestProxy_Connect(t *testing.T) { + t.Run("proxy unhealthy", func(t *testing.T) { + node := &Proxy{} + node.UpdateStateCode(commonpb.StateCode_Abnormal) + + resp, err := node.Connect(context.TODO(), nil) + assert.NoError(t, err) + assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + }) + + t.Run("failed to allocate ts", func(t *testing.T) { + m := newMockTimestampAllocator(t) + m.On("AllocTimestamp", + mock.Anything, + mock.Anything, + ).Return(nil, errors.New("error mock AllocateTimestamp")) + alloc, _ := newTimestampAllocator(m, 199) + node := Proxy{ + tsoAllocator: alloc, + } + node.UpdateStateCode(commonpb.StateCode_Healthy) + resp, err := node.Connect(context.TODO(), nil) + assert.NoError(t, err) + assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + }) + + t.Run("normal case", func(t *testing.T) { + m := newMockTimestampAllocator(t) + m.On("AllocTimestamp", + mock.Anything, + mock.Anything, + ).Return(&rootcoordpb.AllocTimestampResponse{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_Success, + }, + Timestamp: 20230518, + Count: 1, + }, nil) + alloc, _ := newTimestampAllocator(m, 199) + node := Proxy{ + tsoAllocator: alloc, + } + node.UpdateStateCode(commonpb.StateCode_Healthy) + resp, err := node.Connect(context.TODO(), &milvuspb.ConnectRequest{ + ClientInfo: &commonpb.ClientInfo{}, + }) + assert.NoError(t, err) + assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + }) +} + +func TestProxy_ListClientInfos(t *testing.T) { + t.Run("proxy unhealthy", func(t *testing.T) { + node := &Proxy{} + node.UpdateStateCode(commonpb.StateCode_Abnormal) + + resp, err := node.ListClientInfos(context.TODO(), nil) + assert.NoError(t, err) + assert.NotEqual(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + }) + + t.Run("normal case", func(t *testing.T) { + node := Proxy{} + node.UpdateStateCode(commonpb.StateCode_Healthy) + + resp, err := node.ListClientInfos(context.TODO(), nil) + assert.NoError(t, err) + assert.Equal(t, commonpb.ErrorCode_Success, resp.GetStatus().GetErrorCode()) + + }) +} diff --git a/internal/proxy/interface_def.go b/internal/proxy/interface_def.go index aeb77db870..6851e99e5f 100644 --- a/internal/proxy/interface_def.go +++ b/internal/proxy/interface_def.go @@ -29,6 +29,7 @@ type tsoAllocator interface { } // use timestampAllocatorInterface to keep other components testable +//go:generate mockery --name=timestampAllocatorInterface --filename=mock_tso_test.go --outpkg=proxy --output=. --inpackage --structname=mockTimestampAllocator --with-expecter type timestampAllocatorInterface interface { AllocTimestamp(ctx context.Context, req *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) } diff --git a/internal/proxy/keep_active_interceptor.go b/internal/proxy/keep_active_interceptor.go new file mode 100644 index 0000000000..91f7450eec --- /dev/null +++ b/internal/proxy/keep_active_interceptor.go @@ -0,0 +1,42 @@ +package proxy + +import ( + "context" + "fmt" + "strconv" + + "github.com/milvus-io/milvus/internal/util" + "github.com/milvus-io/milvus/internal/util/funcutil" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +func getIdentifierFromContext(ctx context.Context) (int64, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return 0, fmt.Errorf("fail to get metadata from the context") + } + identifierContent, ok := md[util.IdentifierKey] + if !ok || len(identifierContent) < 1 { + return 0, fmt.Errorf("no identifier found in metadata") + } + identifier, err := strconv.ParseInt(identifierContent[0], 10, 64) + if err != nil { + return 0, fmt.Errorf("failed to parse identifier: %s, error: %s", identifierContent[0], err.Error()) + } + return identifier, nil +} + +func KeepActiveInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { + // We shouldn't block the normal rpc. though this may be not very accurate enough. + // On the other hand, too many goroutines will also influence the rpc. + // Not sure which way is better, since actually we already make the `keepActive` asynchronous. + go func() { + identifier, err := getIdentifierFromContext(ctx) + if err == nil && funcutil.CheckCtxValid(ctx) { + GetConnectionManager().keepActive(identifier) + } + }() + + return handler(ctx, req) +} diff --git a/internal/proxy/keep_active_interceptor_test.go b/internal/proxy/keep_active_interceptor_test.go new file mode 100644 index 0000000000..3de5e19f0b --- /dev/null +++ b/internal/proxy/keep_active_interceptor_test.go @@ -0,0 +1,65 @@ +package proxy + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +func Test_getIdentifierFromContext(t *testing.T) { + t.Run("metadata not found", func(t *testing.T) { + ctx := context.TODO() + _, err := getIdentifierFromContext(ctx) + assert.Error(t, err) + }) + + t.Run("no identifier", func(t *testing.T) { + md := metadata.New(map[string]string{}) + ctx := metadata.NewIncomingContext(context.TODO(), md) + _, err := getIdentifierFromContext(ctx) + assert.Error(t, err) + }) + + t.Run("invalid identifier", func(t *testing.T) { + md := metadata.New(map[string]string{ + "identifier": "i-am-not-invalid-identifier", + }) + ctx := metadata.NewIncomingContext(context.TODO(), md) + _, err := getIdentifierFromContext(ctx) + assert.Error(t, err) + }) + + t.Run("normal case", func(t *testing.T) { + md := metadata.New(map[string]string{ + "identifier": "20230518", + }) + ctx := metadata.NewIncomingContext(context.TODO(), md) + identifier, err := getIdentifierFromContext(ctx) + assert.NoError(t, err) + assert.Equal(t, int64(20230518), identifier) + }) +} + +func TestKeepActiveInterceptor(t *testing.T) { + md := metadata.New(map[string]string{ + "identifier": "20230518", + }) + ctx := metadata.NewIncomingContext(context.TODO(), md) + + rpcCalled := false + rpcChan := make(chan struct{}, 1) + var handler grpc.UnaryHandler = func(ctx context.Context, req interface{}) (interface{}, error) { + rpcCalled = true + rpcChan <- struct{}{} + return "not-important", nil + } + + got, err := KeepActiveInterceptor(ctx, nil, nil, handler) + <-rpcChan + assert.True(t, rpcCalled) + assert.NoError(t, err) + assert.Equal(t, "not-important", got) +} diff --git a/internal/proxy/mock_tso_test.go b/internal/proxy/mock_tso_test.go new file mode 100644 index 0000000000..a40a5e9ab5 --- /dev/null +++ b/internal/proxy/mock_tso_test.go @@ -0,0 +1,85 @@ +// Code generated by mockery v2.16.0. DO NOT EDIT. + +package proxy + +import ( + context "context" + + rootcoordpb "github.com/milvus-io/milvus/internal/proto/rootcoordpb" + mock "github.com/stretchr/testify/mock" +) + +// mockTimestampAllocator is an autogenerated mock type for the timestampAllocatorInterface type +type mockTimestampAllocator struct { + mock.Mock +} + +type mockTimestampAllocator_Expecter struct { + mock *mock.Mock +} + +func (_m *mockTimestampAllocator) EXPECT() *mockTimestampAllocator_Expecter { + return &mockTimestampAllocator_Expecter{mock: &_m.Mock} +} + +// AllocTimestamp provides a mock function with given fields: ctx, req +func (_m *mockTimestampAllocator) AllocTimestamp(ctx context.Context, req *rootcoordpb.AllocTimestampRequest) (*rootcoordpb.AllocTimestampResponse, error) { + ret := _m.Called(ctx, req) + + var r0 *rootcoordpb.AllocTimestampResponse + if rf, ok := ret.Get(0).(func(context.Context, *rootcoordpb.AllocTimestampRequest) *rootcoordpb.AllocTimestampResponse); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*rootcoordpb.AllocTimestampResponse) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *rootcoordpb.AllocTimestampRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// mockTimestampAllocator_AllocTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocTimestamp' +type mockTimestampAllocator_AllocTimestamp_Call struct { + *mock.Call +} + +// AllocTimestamp is a helper method to define mock.On call +// - ctx context.Context +// - req *rootcoordpb.AllocTimestampRequest +func (_e *mockTimestampAllocator_Expecter) AllocTimestamp(ctx interface{}, req interface{}) *mockTimestampAllocator_AllocTimestamp_Call { + return &mockTimestampAllocator_AllocTimestamp_Call{Call: _e.mock.On("AllocTimestamp", ctx, req)} +} + +func (_c *mockTimestampAllocator_AllocTimestamp_Call) Run(run func(ctx context.Context, req *rootcoordpb.AllocTimestampRequest)) *mockTimestampAllocator_AllocTimestamp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*rootcoordpb.AllocTimestampRequest)) + }) + return _c +} + +func (_c *mockTimestampAllocator_AllocTimestamp_Call) Return(_a0 *rootcoordpb.AllocTimestampResponse, _a1 error) *mockTimestampAllocator_AllocTimestamp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +type mockConstructorTestingTnewMockTimestampAllocator interface { + mock.TestingT + Cleanup(func()) +} + +// newMockTimestampAllocator creates a new instance of mockTimestampAllocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func newMockTimestampAllocator(t mockConstructorTestingTnewMockTimestampAllocator) *mockTimestampAllocator { + mock := &mockTimestampAllocator{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/proxy/proxy.go b/internal/proxy/proxy.go index e3201f46e2..0b4eceb09a 100644 --- a/internal/proxy/proxy.go +++ b/internal/proxy/proxy.go @@ -440,6 +440,8 @@ func (node *Proxy) Stop() error { // https://github.com/milvus-io/milvus/issues/12282 node.UpdateStateCode(commonpb.StateCode_Abnormal) + GetConnectionManager().stop() + return nil } diff --git a/internal/types/types.go b/internal/types/types.go index 35045fa047..776151fd82 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -909,6 +909,8 @@ type Proxy interface { // because it only obtains the metrics of Proxy, not including the topological metrics of Query cluster and Data cluster. GetProxyMetrics(ctx context.Context, request *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error) RefreshPolicyInfoCache(ctx context.Context, req *proxypb.RefreshPolicyInfoCacheRequest) (*commonpb.Status, error) + + ListClientInfos(ctx context.Context, req *proxypb.ListClientInfosRequest) (*proxypb.ListClientInfosResponse, error) } // ProxyComponent defines the interface of proxy component. @@ -1410,6 +1412,8 @@ type ProxyComponent interface { TransferReplica(ctx context.Context, req *milvuspb.TransferReplicaRequest) (*commonpb.Status, error) ListResourceGroups(ctx context.Context, req *milvuspb.ListResourceGroupsRequest) (*milvuspb.ListResourceGroupsResponse, error) DescribeResourceGroup(ctx context.Context, req *milvuspb.DescribeResourceGroupRequest) (*milvuspb.DescribeResourceGroupResponse, error) + + Connect(ctx context.Context, req *milvuspb.ConnectRequest) (*milvuspb.ConnectResponse, error) } // QueryNode is the interface `querynode` package implements diff --git a/internal/util/constant.go b/internal/util/constant.go index 46ca85a5a0..36368541b5 100644 --- a/internal/util/constant.go +++ b/internal/util/constant.go @@ -58,6 +58,8 @@ const ( AnyWord = "*" HeaderDatabase = "dbname" + + IdentifierKey = "identifier" ) const ( diff --git a/internal/util/mock/grpc_proxy_client.go b/internal/util/mock/grpc_proxy_client.go index 86365fdf4e..ab14e93f55 100644 --- a/internal/util/mock/grpc_proxy_client.go +++ b/internal/util/mock/grpc_proxy_client.go @@ -68,3 +68,7 @@ func (m *GrpcProxyClient) GetProxyMetrics(ctx context.Context, in *milvuspb.GetM func (m *GrpcProxyClient) SetRates(ctx context.Context, in *proxypb.SetRatesRequest, opts ...grpc.CallOption) (*commonpb.Status, error) { return &commonpb.Status{}, m.Err } + +func (m *GrpcProxyClient) ListClientInfos(ctx context.Context, in *proxypb.ListClientInfosRequest, opts ...grpc.CallOption) (*proxypb.ListClientInfosResponse, error) { + return &proxypb.ListClientInfosResponse{}, m.Err +}