#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAliasRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub alias: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropAliasRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub alias: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterAliasRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub alias: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCollectionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(bytes="vec", tag="4")]
pub schema: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, tag="5")]
pub shards_num: i32,
#[prost(enumeration="super::common::ConsistencyLevel", tag="6")]
pub consistency_level: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropCollectionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HasCollectionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(uint64, tag="4")]
pub time_stamp: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoolResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(bool, tag="2")]
pub value: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StringResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(string, tag="2")]
pub value: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeCollectionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub collection_id: i64,
#[prost(uint64, tag="5")]
pub time_stamp: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeCollectionResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag="2")]
pub schema: ::core::option::Option<super::schema::CollectionSchema>,
#[prost(int64, tag="3")]
pub collection_id: i64,
#[prost(string, repeated, tag="4")]
pub virtual_channel_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag="5")]
pub physical_channel_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag="6")]
pub created_timestamp: u64,
#[prost(uint64, tag="7")]
pub created_utc_timestamp: u64,
#[prost(int32, tag="8")]
pub shards_num: i32,
#[prost(string, repeated, tag="9")]
pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag="10")]
pub start_positions: ::prost::alloc::vec::Vec<super::common::KeyDataPair>,
#[prost(enumeration="super::common::ConsistencyLevel", tag="11")]
pub consistency_level: i32,
#[prost(string, tag="12")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadCollectionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(int32, tag="4")]
pub replica_number: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleaseCollectionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCollectionStatisticsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCollectionStatisticsResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub stats: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowCollectionsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(uint64, tag="3")]
pub time_stamp: u64,
#[prost(enumeration="ShowType", tag="4")]
pub r#type: i32,
#[prost(string, repeated, tag="5")]
pub collection_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowCollectionsResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(string, repeated, tag="2")]
pub collection_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, repeated, tag="3")]
pub collection_ids: ::prost::alloc::vec::Vec<i64>,
#[prost(uint64, repeated, tag="4")]
pub created_timestamps: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag="5")]
pub created_utc_timestamps: ::prost::alloc::vec::Vec<u64>,
#[prost(int64, repeated, tag="6")]
pub in_memory_percentages: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePartitionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub partition_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropPartitionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub partition_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HasPartitionRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub partition_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadPartitionsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag="4")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag="5")]
pub replica_number: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleasePartitionsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag="4")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPartitionStatisticsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub partition_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPartitionStatisticsResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub stats: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowPartitionsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(int64, tag="4")]
pub collection_id: i64,
#[prost(string, repeated, tag="5")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration="ShowType", tag="6")]
pub r#type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowPartitionsResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(string, repeated, tag="2")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, repeated, tag="3")]
pub partition_i_ds: ::prost::alloc::vec::Vec<i64>,
#[prost(uint64, repeated, tag="4")]
pub created_timestamps: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag="5")]
pub created_utc_timestamps: ::prost::alloc::vec::Vec<u64>,
#[prost(int64, repeated, tag="6")]
pub in_memory_percentages: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeSegmentRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(int64, tag="2")]
pub collection_id: i64,
#[prost(int64, tag="3")]
pub segment_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeSegmentResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(int64, tag="2")]
pub index_id: i64,
#[prost(int64, tag="3")]
pub build_id: i64,
#[prost(bool, tag="4")]
pub enable_index: bool,
#[prost(int64, tag="5")]
pub field_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowSegmentsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(int64, tag="2")]
pub collection_id: i64,
#[prost(int64, tag="3")]
pub partition_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShowSegmentsResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(int64, repeated, tag="2")]
pub segment_i_ds: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIndexRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub field_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="5")]
pub extra_params: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
#[prost(string, tag="6")]
pub index_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeIndexRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub field_name: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub index_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexDescription {
#[prost(string, tag="1")]
pub index_name: ::prost::alloc::string::String,
#[prost(int64, tag="2")]
pub index_id: i64,
#[prost(message, repeated, tag="3")]
pub params: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
#[prost(string, tag="4")]
pub field_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeIndexResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub index_descriptions: ::prost::alloc::vec::Vec<IndexDescription>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexBuildProgressRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub field_name: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub index_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexBuildProgressResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(int64, tag="2")]
pub indexed_rows: i64,
#[prost(int64, tag="3")]
pub total_rows: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexStateRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub field_name: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub index_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexStateResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(enumeration="super::common::IndexState", tag="2")]
pub state: i32,
#[prost(string, tag="3")]
pub fail_reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropIndexRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub field_name: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub index_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsertRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub partition_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="5")]
pub fields_data: ::prost::alloc::vec::Vec<super::schema::FieldData>,
#[prost(uint32, repeated, tag="6")]
pub hash_keys: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag="7")]
pub num_rows: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MutationResult {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag="2")]
pub i_ds: ::core::option::Option<super::schema::IDs>,
#[prost(uint32, repeated, tag="3")]
pub succ_index: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, repeated, tag="4")]
pub err_index: ::prost::alloc::vec::Vec<u32>,
#[prost(bool, tag="5")]
pub acknowledged: bool,
#[prost(int64, tag="6")]
pub insert_cnt: i64,
#[prost(int64, tag="7")]
pub delete_cnt: i64,
#[prost(int64, tag="8")]
pub upsert_cnt: i64,
#[prost(uint64, tag="9")]
pub timestamp: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub partition_name: ::prost::alloc::string::String,
#[prost(string, tag="5")]
pub expr: ::prost::alloc::string::String,
#[prost(uint32, repeated, tag="6")]
pub hash_keys: ::prost::alloc::vec::Vec<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceholderValue {
#[prost(string, tag="1")]
pub tag: ::prost::alloc::string::String,
#[prost(enumeration="PlaceholderType", tag="2")]
pub r#type: i32,
#[prost(bytes="vec", repeated, tag="3")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceholderGroup {
#[prost(message, repeated, tag="1")]
pub placeholders: ::prost::alloc::vec::Vec<PlaceholderValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag="4")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag="5")]
pub dsl: ::prost::alloc::string::String,
#[prost(bytes="vec", tag="6")]
pub placeholder_group: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration="super::common::DslType", tag="7")]
pub dsl_type: i32,
#[prost(string, repeated, tag="8")]
pub output_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag="9")]
pub search_params: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
#[prost(uint64, tag="10")]
pub travel_timestamp: u64,
#[prost(uint64, tag="11")]
pub guarantee_timestamp: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hits {
#[prost(int64, repeated, tag="1")]
pub i_ds: ::prost::alloc::vec::Vec<i64>,
#[prost(bytes="vec", repeated, tag="2")]
pub row_data: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(float, repeated, tag="3")]
pub scores: ::prost::alloc::vec::Vec<f32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResults {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag="2")]
pub results: ::core::option::Option<super::schema::SearchResultData>,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlushRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
pub collection_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlushResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(map="string, message", tag="3")]
pub coll_seg_i_ds: ::std::collections::HashMap<::prost::alloc::string::String, super::schema::LongArray>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub expr: ::prost::alloc::string::String,
#[prost(string, repeated, tag="5")]
pub output_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag="6")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag="7")]
pub travel_timestamp: u64,
#[prost(uint64, tag="8")]
pub guarantee_timestamp: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryResults {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub fields_data: ::prost::alloc::vec::Vec<super::schema::FieldData>,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorIDs {
#[prost(string, tag="1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub field_name: ::prost::alloc::string::String,
#[prost(message, optional, tag="3")]
pub id_array: ::core::option::Option<super::schema::IDs>,
#[prost(string, repeated, tag="4")]
pub partition_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorsArray {
#[prost(oneof="vectors_array::Array", tags="1, 2")]
pub array: ::core::option::Option<vectors_array::Array>,
}
pub mod vectors_array {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Array {
#[prost(message, tag="1")]
IdArray(super::VectorIDs),
#[prost(message, tag="2")]
DataArray(super::super::schema::VectorField),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalcDistanceRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(message, optional, tag="2")]
pub op_left: ::core::option::Option<VectorsArray>,
#[prost(message, optional, tag="3")]
pub op_right: ::core::option::Option<VectorsArray>,
#[prost(message, repeated, tag="4")]
pub params: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalcDistanceResults {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(oneof="calc_distance_results::Array", tags="2, 3")]
pub array: ::core::option::Option<calc_distance_results::Array>,
}
pub mod calc_distance_results {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Array {
#[prost(message, tag="2")]
IntDist(super::super::schema::IntArray),
#[prost(message, tag="3")]
FloatDist(super::super::schema::FloatArray),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PersistentSegmentInfo {
#[prost(int64, tag="1")]
pub segment_id: i64,
#[prost(int64, tag="2")]
pub collection_id: i64,
#[prost(int64, tag="3")]
pub partition_id: i64,
#[prost(int64, tag="4")]
pub num_rows: i64,
#[prost(enumeration="super::common::SegmentState", tag="5")]
pub state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPersistentSegmentInfoRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPersistentSegmentInfoResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub infos: ::prost::alloc::vec::Vec<PersistentSegmentInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QuerySegmentInfo {
#[prost(int64, tag="1")]
pub segment_id: i64,
#[prost(int64, tag="2")]
pub collection_id: i64,
#[prost(int64, tag="3")]
pub partition_id: i64,
#[prost(int64, tag="4")]
pub mem_size: i64,
#[prost(int64, tag="5")]
pub num_rows: i64,
#[prost(string, tag="6")]
pub index_name: ::prost::alloc::string::String,
#[prost(int64, tag="7")]
pub index_id: i64,
#[prost(int64, tag="8")]
pub node_id: i64,
#[prost(enumeration="super::common::SegmentState", tag="9")]
pub state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetQuerySegmentInfoRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub db_name: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetQuerySegmentInfoResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub infos: ::prost::alloc::vec::Vec<QuerySegmentInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DummyRequest {
#[prost(string, tag="1")]
pub request_type: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DummyResponse {
#[prost(string, tag="1")]
pub response: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterLinkRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterLinkResponse {
#[prost(message, optional, tag="1")]
pub address: ::core::option::Option<super::common::Address>,
#[prost(message, optional, tag="2")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetricsRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub request: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetricsResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(string, tag="2")]
pub response: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub component_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoadBalanceRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(int64, tag="2")]
pub src_node_id: i64,
#[prost(int64, repeated, tag="3")]
pub dst_node_i_ds: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, repeated, tag="4")]
pub sealed_segment_i_ds: ::prost::alloc::vec::Vec<i64>,
#[prost(string, tag="5")]
pub collection_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManualCompactionRequest {
#[prost(int64, tag="1")]
pub collection_id: i64,
#[prost(uint64, tag="2")]
pub timetravel: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManualCompactionResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(int64, tag="2")]
pub compaction_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCompactionStateRequest {
#[prost(int64, tag="1")]
pub compaction_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCompactionStateResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(enumeration="super::common::CompactionState", tag="2")]
pub state: i32,
#[prost(int64, tag="3")]
pub executing_plan_no: i64,
#[prost(int64, tag="4")]
pub timeout_plan_no: i64,
#[prost(int64, tag="5")]
pub completed_plan_no: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCompactionPlansRequest {
#[prost(int64, tag="1")]
pub compaction_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCompactionPlansResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(enumeration="super::common::CompactionState", tag="2")]
pub state: i32,
#[prost(message, repeated, tag="3")]
pub merge_infos: ::prost::alloc::vec::Vec<CompactionMergeInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactionMergeInfo {
#[prost(int64, repeated, tag="1")]
pub sources: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, tag="2")]
pub target: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFlushStateRequest {
#[prost(int64, repeated, tag="1")]
pub segment_i_ds: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFlushStateResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(bool, tag="2")]
pub flushed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportRequest {
#[prost(string, tag="1")]
pub collection_name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub partition_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag="3")]
pub channel_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag="4")]
pub row_based: bool,
#[prost(string, repeated, tag="5")]
pub files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag="6")]
pub options: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(int64, repeated, tag="2")]
pub tasks: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetImportStateRequest {
#[prost(int64, tag="1")]
pub task: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetImportStateResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(enumeration="super::common::ImportState", tag="2")]
pub state: i32,
#[prost(int64, tag="3")]
pub row_count: i64,
#[prost(int64, repeated, tag="4")]
pub id_list: ::prost::alloc::vec::Vec<i64>,
#[prost(message, repeated, tag="5")]
pub infos: ::prost::alloc::vec::Vec<super::common::KeyValuePair>,
#[prost(int64, tag="6")]
pub id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListImportTasksRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListImportTasksResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub tasks: ::prost::alloc::vec::Vec<GetImportStateResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReplicasRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(int64, tag="2")]
pub collection_id: i64,
#[prost(bool, tag="3")]
pub with_shard_nodes: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReplicasResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag="2")]
pub replicas: ::prost::alloc::vec::Vec<ReplicaInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplicaInfo {
#[prost(int64, tag="1")]
pub replica_id: i64,
#[prost(int64, tag="2")]
pub collection_id: i64,
#[prost(int64, repeated, tag="3")]
pub partition_ids: ::prost::alloc::vec::Vec<i64>,
#[prost(message, repeated, tag="4")]
pub shard_replicas: ::prost::alloc::vec::Vec<ShardReplica>,
#[prost(int64, repeated, tag="5")]
pub node_ids: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardReplica {
#[prost(int64, tag="1")]
pub leader_id: i64,
#[prost(string, tag="2")]
pub leader_addr: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub dm_channel_name: ::prost::alloc::string::String,
#[prost(int64, repeated, tag="4")]
pub node_ids: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCredentialRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub password: ::prost::alloc::string::String,
#[prost(uint64, tag="4")]
pub created_utc_timestamps: u64,
#[prost(uint64, tag="5")]
pub modified_utc_timestamps: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCredentialRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub username: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub old_password: ::prost::alloc::string::String,
#[prost(string, tag="4")]
pub new_password: ::prost::alloc::string::String,
#[prost(uint64, tag="5")]
pub created_utc_timestamps: u64,
#[prost(uint64, tag="6")]
pub modified_utc_timestamps: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCredentialRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
#[prost(string, tag="2")]
pub username: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCredUsersResponse {
#[prost(message, optional, tag="1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(string, repeated, tag="2")]
pub usernames: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCredUsersRequest {
#[prost(message, optional, tag="1")]
pub base: ::core::option::Option<super::common::MsgBase>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ShowType {
All = 0,
InMemory = 1,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlaceholderType {
None = 0,
BinaryVector = 100,
FloatVector = 101,
}
pub mod milvus_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct MilvusServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MilvusServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MilvusServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MilvusServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
MilvusServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn create_collection(
&mut self,
request: impl tonic::IntoRequest<super::CreateCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/CreateCollection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn drop_collection(
&mut self,
request: impl tonic::IntoRequest<super::DropCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DropCollection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn has_collection(
&mut self,
request: impl tonic::IntoRequest<super::HasCollectionRequest>,
) -> Result<tonic::Response<super::BoolResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/HasCollection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn load_collection(
&mut self,
request: impl tonic::IntoRequest<super::LoadCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/LoadCollection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn release_collection(
&mut self,
request: impl tonic::IntoRequest<super::ReleaseCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ReleaseCollection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn describe_collection(
&mut self,
request: impl tonic::IntoRequest<super::DescribeCollectionRequest>,
) -> Result<tonic::Response<super::DescribeCollectionResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DescribeCollection",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_collection_statistics(
&mut self,
request: impl tonic::IntoRequest<super::GetCollectionStatisticsRequest>,
) -> Result<
tonic::Response<super::GetCollectionStatisticsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetCollectionStatistics",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn show_collections(
&mut self,
request: impl tonic::IntoRequest<super::ShowCollectionsRequest>,
) -> Result<tonic::Response<super::ShowCollectionsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ShowCollections",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_partition(
&mut self,
request: impl tonic::IntoRequest<super::CreatePartitionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/CreatePartition",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn drop_partition(
&mut self,
request: impl tonic::IntoRequest<super::DropPartitionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DropPartition",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn has_partition(
&mut self,
request: impl tonic::IntoRequest<super::HasPartitionRequest>,
) -> Result<tonic::Response<super::BoolResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/HasPartition",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn load_partitions(
&mut self,
request: impl tonic::IntoRequest<super::LoadPartitionsRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/LoadPartitions",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn release_partitions(
&mut self,
request: impl tonic::IntoRequest<super::ReleasePartitionsRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ReleasePartitions",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_partition_statistics(
&mut self,
request: impl tonic::IntoRequest<super::GetPartitionStatisticsRequest>,
) -> Result<
tonic::Response<super::GetPartitionStatisticsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetPartitionStatistics",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn show_partitions(
&mut self,
request: impl tonic::IntoRequest<super::ShowPartitionsRequest>,
) -> Result<tonic::Response<super::ShowPartitionsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ShowPartitions",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_alias(
&mut self,
request: impl tonic::IntoRequest<super::CreateAliasRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/CreateAlias",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn drop_alias(
&mut self,
request: impl tonic::IntoRequest<super::DropAliasRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DropAlias",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn alter_alias(
&mut self,
request: impl tonic::IntoRequest<super::AlterAliasRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/AlterAlias",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_index(
&mut self,
request: impl tonic::IntoRequest<super::CreateIndexRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/CreateIndex",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn describe_index(
&mut self,
request: impl tonic::IntoRequest<super::DescribeIndexRequest>,
) -> Result<tonic::Response<super::DescribeIndexResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DescribeIndex",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_index_state(
&mut self,
request: impl tonic::IntoRequest<super::GetIndexStateRequest>,
) -> Result<tonic::Response<super::GetIndexStateResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetIndexState",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_index_build_progress(
&mut self,
request: impl tonic::IntoRequest<super::GetIndexBuildProgressRequest>,
) -> Result<
tonic::Response<super::GetIndexBuildProgressResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetIndexBuildProgress",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn drop_index(
&mut self,
request: impl tonic::IntoRequest<super::DropIndexRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DropIndex",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn insert(
&mut self,
request: impl tonic::IntoRequest<super::InsertRequest>,
) -> Result<tonic::Response<super::MutationResult>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Insert",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRequest>,
) -> Result<tonic::Response<super::MutationResult>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Delete",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn search(
&mut self,
request: impl tonic::IntoRequest<super::SearchRequest>,
) -> Result<tonic::Response<super::SearchResults>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Search",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn flush(
&mut self,
request: impl tonic::IntoRequest<super::FlushRequest>,
) -> Result<tonic::Response<super::FlushResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Flush",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn query(
&mut self,
request: impl tonic::IntoRequest<super::QueryRequest>,
) -> Result<tonic::Response<super::QueryResults>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Query",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn calc_distance(
&mut self,
request: impl tonic::IntoRequest<super::CalcDistanceRequest>,
) -> Result<tonic::Response<super::CalcDistanceResults>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/CalcDistance",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_flush_state(
&mut self,
request: impl tonic::IntoRequest<super::GetFlushStateRequest>,
) -> Result<tonic::Response<super::GetFlushStateResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetFlushState",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_persistent_segment_info(
&mut self,
request: impl tonic::IntoRequest<super::GetPersistentSegmentInfoRequest>,
) -> Result<
tonic::Response<super::GetPersistentSegmentInfoResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetPersistentSegmentInfo",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_query_segment_info(
&mut self,
request: impl tonic::IntoRequest<super::GetQuerySegmentInfoRequest>,
) -> Result<tonic::Response<super::GetQuerySegmentInfoResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetQuerySegmentInfo",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_replicas(
&mut self,
request: impl tonic::IntoRequest<super::GetReplicasRequest>,
) -> Result<tonic::Response<super::GetReplicasResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetReplicas",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn dummy(
&mut self,
request: impl tonic::IntoRequest<super::DummyRequest>,
) -> Result<tonic::Response<super::DummyResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Dummy",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn register_link(
&mut self,
request: impl tonic::IntoRequest<super::RegisterLinkRequest>,
) -> Result<tonic::Response<super::RegisterLinkResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/RegisterLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_metrics(
&mut self,
request: impl tonic::IntoRequest<super::GetMetricsRequest>,
) -> Result<tonic::Response<super::GetMetricsResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetMetrics",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn load_balance(
&mut self,
request: impl tonic::IntoRequest<super::LoadBalanceRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/LoadBalance",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_compaction_state(
&mut self,
request: impl tonic::IntoRequest<super::GetCompactionStateRequest>,
) -> Result<tonic::Response<super::GetCompactionStateResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetCompactionState",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn manual_compaction(
&mut self,
request: impl tonic::IntoRequest<super::ManualCompactionRequest>,
) -> Result<tonic::Response<super::ManualCompactionResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ManualCompaction",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_compaction_state_with_plans(
&mut self,
request: impl tonic::IntoRequest<super::GetCompactionPlansRequest>,
) -> Result<tonic::Response<super::GetCompactionPlansResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetCompactionStateWithPlans",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn import(
&mut self,
request: impl tonic::IntoRequest<super::ImportRequest>,
) -> Result<tonic::Response<super::ImportResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/Import",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_import_state(
&mut self,
request: impl tonic::IntoRequest<super::GetImportStateRequest>,
) -> Result<tonic::Response<super::GetImportStateResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/GetImportState",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_import_tasks(
&mut self,
request: impl tonic::IntoRequest<super::ListImportTasksRequest>,
) -> Result<tonic::Response<super::ListImportTasksResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ListImportTasks",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_credential(
&mut self,
request: impl tonic::IntoRequest<super::CreateCredentialRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/CreateCredential",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_credential(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCredentialRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/UpdateCredential",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_credential(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCredentialRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/DeleteCredential",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_cred_users(
&mut self,
request: impl tonic::IntoRequest<super::ListCredUsersRequest>,
) -> Result<tonic::Response<super::ListCredUsersResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.MilvusService/ListCredUsers",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
pub mod proxy_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct ProxyServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ProxyServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ProxyServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProxyServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ProxyServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[must_use]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
pub async fn register_link(
&mut self,
request: impl tonic::IntoRequest<super::RegisterLinkRequest>,
) -> Result<tonic::Response<super::RegisterLinkResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/milvus.proto.milvus.ProxyService/RegisterLink",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
pub mod milvus_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait MilvusService: Send + Sync + 'static {
async fn create_collection(
&self,
request: tonic::Request<super::CreateCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn drop_collection(
&self,
request: tonic::Request<super::DropCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn has_collection(
&self,
request: tonic::Request<super::HasCollectionRequest>,
) -> Result<tonic::Response<super::BoolResponse>, tonic::Status>;
async fn load_collection(
&self,
request: tonic::Request<super::LoadCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn release_collection(
&self,
request: tonic::Request<super::ReleaseCollectionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn describe_collection(
&self,
request: tonic::Request<super::DescribeCollectionRequest>,
) -> Result<tonic::Response<super::DescribeCollectionResponse>, tonic::Status>;
async fn get_collection_statistics(
&self,
request: tonic::Request<super::GetCollectionStatisticsRequest>,
) -> Result<
tonic::Response<super::GetCollectionStatisticsResponse>,
tonic::Status,
>;
async fn show_collections(
&self,
request: tonic::Request<super::ShowCollectionsRequest>,
) -> Result<tonic::Response<super::ShowCollectionsResponse>, tonic::Status>;
async fn create_partition(
&self,
request: tonic::Request<super::CreatePartitionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn drop_partition(
&self,
request: tonic::Request<super::DropPartitionRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn has_partition(
&self,
request: tonic::Request<super::HasPartitionRequest>,
) -> Result<tonic::Response<super::BoolResponse>, tonic::Status>;
async fn load_partitions(
&self,
request: tonic::Request<super::LoadPartitionsRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn release_partitions(
&self,
request: tonic::Request<super::ReleasePartitionsRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn get_partition_statistics(
&self,
request: tonic::Request<super::GetPartitionStatisticsRequest>,
) -> Result<
tonic::Response<super::GetPartitionStatisticsResponse>,
tonic::Status,
>;
async fn show_partitions(
&self,
request: tonic::Request<super::ShowPartitionsRequest>,
) -> Result<tonic::Response<super::ShowPartitionsResponse>, tonic::Status>;
async fn create_alias(
&self,
request: tonic::Request<super::CreateAliasRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn drop_alias(
&self,
request: tonic::Request<super::DropAliasRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn alter_alias(
&self,
request: tonic::Request<super::AlterAliasRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn create_index(
&self,
request: tonic::Request<super::CreateIndexRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn describe_index(
&self,
request: tonic::Request<super::DescribeIndexRequest>,
) -> Result<tonic::Response<super::DescribeIndexResponse>, tonic::Status>;
async fn get_index_state(
&self,
request: tonic::Request<super::GetIndexStateRequest>,
) -> Result<tonic::Response<super::GetIndexStateResponse>, tonic::Status>;
async fn get_index_build_progress(
&self,
request: tonic::Request<super::GetIndexBuildProgressRequest>,
) -> Result<
tonic::Response<super::GetIndexBuildProgressResponse>,
tonic::Status,
>;
async fn drop_index(
&self,
request: tonic::Request<super::DropIndexRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn insert(
&self,
request: tonic::Request<super::InsertRequest>,
) -> Result<tonic::Response<super::MutationResult>, tonic::Status>;
async fn delete(
&self,
request: tonic::Request<super::DeleteRequest>,
) -> Result<tonic::Response<super::MutationResult>, tonic::Status>;
async fn search(
&self,
request: tonic::Request<super::SearchRequest>,
) -> Result<tonic::Response<super::SearchResults>, tonic::Status>;
async fn flush(
&self,
request: tonic::Request<super::FlushRequest>,
) -> Result<tonic::Response<super::FlushResponse>, tonic::Status>;
async fn query(
&self,
request: tonic::Request<super::QueryRequest>,
) -> Result<tonic::Response<super::QueryResults>, tonic::Status>;
async fn calc_distance(
&self,
request: tonic::Request<super::CalcDistanceRequest>,
) -> Result<tonic::Response<super::CalcDistanceResults>, tonic::Status>;
async fn get_flush_state(
&self,
request: tonic::Request<super::GetFlushStateRequest>,
) -> Result<tonic::Response<super::GetFlushStateResponse>, tonic::Status>;
async fn get_persistent_segment_info(
&self,
request: tonic::Request<super::GetPersistentSegmentInfoRequest>,
) -> Result<
tonic::Response<super::GetPersistentSegmentInfoResponse>,
tonic::Status,
>;
async fn get_query_segment_info(
&self,
request: tonic::Request<super::GetQuerySegmentInfoRequest>,
) -> Result<tonic::Response<super::GetQuerySegmentInfoResponse>, tonic::Status>;
async fn get_replicas(
&self,
request: tonic::Request<super::GetReplicasRequest>,
) -> Result<tonic::Response<super::GetReplicasResponse>, tonic::Status>;
async fn dummy(
&self,
request: tonic::Request<super::DummyRequest>,
) -> Result<tonic::Response<super::DummyResponse>, tonic::Status>;
async fn register_link(
&self,
request: tonic::Request<super::RegisterLinkRequest>,
) -> Result<tonic::Response<super::RegisterLinkResponse>, tonic::Status>;
async fn get_metrics(
&self,
request: tonic::Request<super::GetMetricsRequest>,
) -> Result<tonic::Response<super::GetMetricsResponse>, tonic::Status>;
async fn load_balance(
&self,
request: tonic::Request<super::LoadBalanceRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn get_compaction_state(
&self,
request: tonic::Request<super::GetCompactionStateRequest>,
) -> Result<tonic::Response<super::GetCompactionStateResponse>, tonic::Status>;
async fn manual_compaction(
&self,
request: tonic::Request<super::ManualCompactionRequest>,
) -> Result<tonic::Response<super::ManualCompactionResponse>, tonic::Status>;
async fn get_compaction_state_with_plans(
&self,
request: tonic::Request<super::GetCompactionPlansRequest>,
) -> Result<tonic::Response<super::GetCompactionPlansResponse>, tonic::Status>;
async fn import(
&self,
request: tonic::Request<super::ImportRequest>,
) -> Result<tonic::Response<super::ImportResponse>, tonic::Status>;
async fn get_import_state(
&self,
request: tonic::Request<super::GetImportStateRequest>,
) -> Result<tonic::Response<super::GetImportStateResponse>, tonic::Status>;
async fn list_import_tasks(
&self,
request: tonic::Request<super::ListImportTasksRequest>,
) -> Result<tonic::Response<super::ListImportTasksResponse>, tonic::Status>;
async fn create_credential(
&self,
request: tonic::Request<super::CreateCredentialRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn update_credential(
&self,
request: tonic::Request<super::UpdateCredentialRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn delete_credential(
&self,
request: tonic::Request<super::DeleteCredentialRequest>,
) -> Result<tonic::Response<super::super::common::Status>, tonic::Status>;
async fn list_cred_users(
&self,
request: tonic::Request<super::ListCredUsersRequest>,
) -> Result<tonic::Response<super::ListCredUsersResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct MilvusServiceServer<T: MilvusService> {
inner: _Inner<T>,
accept_compression_encodings: (),
send_compression_encodings: (),
}
struct _Inner<T>(Arc<T>);
impl<T: MilvusService> MilvusServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MilvusServiceServer<T>
where
T: MilvusService,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/milvus.proto.milvus.MilvusService/CreateCollection" => {
#[allow(non_camel_case_types)]
struct CreateCollectionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::CreateCollectionRequest>
for CreateCollectionSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateCollectionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).create_collection(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateCollectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DropCollection" => {
#[allow(non_camel_case_types)]
struct DropCollectionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DropCollectionRequest>
for DropCollectionSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropCollectionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).drop_collection(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DropCollectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/HasCollection" => {
#[allow(non_camel_case_types)]
struct HasCollectionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::HasCollectionRequest>
for HasCollectionSvc<T> {
type Response = super::BoolResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::HasCollectionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).has_collection(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = HasCollectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/LoadCollection" => {
#[allow(non_camel_case_types)]
struct LoadCollectionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::LoadCollectionRequest>
for LoadCollectionSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::LoadCollectionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).load_collection(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = LoadCollectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ReleaseCollection" => {
#[allow(non_camel_case_types)]
struct ReleaseCollectionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ReleaseCollectionRequest>
for ReleaseCollectionSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReleaseCollectionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).release_collection(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ReleaseCollectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DescribeCollection" => {
#[allow(non_camel_case_types)]
struct DescribeCollectionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DescribeCollectionRequest>
for DescribeCollectionSvc<T> {
type Response = super::DescribeCollectionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DescribeCollectionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).describe_collection(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DescribeCollectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetCollectionStatistics" => {
#[allow(non_camel_case_types)]
struct GetCollectionStatisticsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetCollectionStatisticsRequest>
for GetCollectionStatisticsSvc<T> {
type Response = super::GetCollectionStatisticsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::GetCollectionStatisticsRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_collection_statistics(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetCollectionStatisticsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ShowCollections" => {
#[allow(non_camel_case_types)]
struct ShowCollectionsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ShowCollectionsRequest>
for ShowCollectionsSvc<T> {
type Response = super::ShowCollectionsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ShowCollectionsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).show_collections(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ShowCollectionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/CreatePartition" => {
#[allow(non_camel_case_types)]
struct CreatePartitionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::CreatePartitionRequest>
for CreatePartitionSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreatePartitionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).create_partition(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreatePartitionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DropPartition" => {
#[allow(non_camel_case_types)]
struct DropPartitionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DropPartitionRequest>
for DropPartitionSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropPartitionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).drop_partition(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DropPartitionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/HasPartition" => {
#[allow(non_camel_case_types)]
struct HasPartitionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::HasPartitionRequest>
for HasPartitionSvc<T> {
type Response = super::BoolResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::HasPartitionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).has_partition(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = HasPartitionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/LoadPartitions" => {
#[allow(non_camel_case_types)]
struct LoadPartitionsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::LoadPartitionsRequest>
for LoadPartitionsSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::LoadPartitionsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).load_partitions(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = LoadPartitionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ReleasePartitions" => {
#[allow(non_camel_case_types)]
struct ReleasePartitionsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ReleasePartitionsRequest>
for ReleasePartitionsSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReleasePartitionsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).release_partitions(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ReleasePartitionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetPartitionStatistics" => {
#[allow(non_camel_case_types)]
struct GetPartitionStatisticsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetPartitionStatisticsRequest>
for GetPartitionStatisticsSvc<T> {
type Response = super::GetPartitionStatisticsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetPartitionStatisticsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_partition_statistics(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetPartitionStatisticsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ShowPartitions" => {
#[allow(non_camel_case_types)]
struct ShowPartitionsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ShowPartitionsRequest>
for ShowPartitionsSvc<T> {
type Response = super::ShowPartitionsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ShowPartitionsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).show_partitions(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ShowPartitionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/CreateAlias" => {
#[allow(non_camel_case_types)]
struct CreateAliasSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::CreateAliasRequest>
for CreateAliasSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateAliasRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).create_alias(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateAliasSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DropAlias" => {
#[allow(non_camel_case_types)]
struct DropAliasSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DropAliasRequest>
for DropAliasSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropAliasRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).drop_alias(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DropAliasSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/AlterAlias" => {
#[allow(non_camel_case_types)]
struct AlterAliasSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::AlterAliasRequest>
for AlterAliasSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterAliasRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).alter_alias(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = AlterAliasSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/CreateIndex" => {
#[allow(non_camel_case_types)]
struct CreateIndexSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::CreateIndexRequest>
for CreateIndexSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateIndexRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).create_index(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateIndexSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DescribeIndex" => {
#[allow(non_camel_case_types)]
struct DescribeIndexSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DescribeIndexRequest>
for DescribeIndexSvc<T> {
type Response = super::DescribeIndexResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DescribeIndexRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).describe_index(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DescribeIndexSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetIndexState" => {
#[allow(non_camel_case_types)]
struct GetIndexStateSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetIndexStateRequest>
for GetIndexStateSvc<T> {
type Response = super::GetIndexStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetIndexStateRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_index_state(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetIndexStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetIndexBuildProgress" => {
#[allow(non_camel_case_types)]
struct GetIndexBuildProgressSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetIndexBuildProgressRequest>
for GetIndexBuildProgressSvc<T> {
type Response = super::GetIndexBuildProgressResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetIndexBuildProgressRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_index_build_progress(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetIndexBuildProgressSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DropIndex" => {
#[allow(non_camel_case_types)]
struct DropIndexSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DropIndexRequest>
for DropIndexSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropIndexRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).drop_index(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DropIndexSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Insert" => {
#[allow(non_camel_case_types)]
struct InsertSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::InsertRequest>
for InsertSvc<T> {
type Response = super::MutationResult;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::InsertRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).insert(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = InsertSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Delete" => {
#[allow(non_camel_case_types)]
struct DeleteSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DeleteRequest>
for DeleteSvc<T> {
type Response = super::MutationResult;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).delete(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Search" => {
#[allow(non_camel_case_types)]
struct SearchSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::SearchRequest>
for SearchSvc<T> {
type Response = super::SearchResults;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SearchRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).search(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = SearchSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Flush" => {
#[allow(non_camel_case_types)]
struct FlushSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::FlushRequest> for FlushSvc<T> {
type Response = super::FlushResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::FlushRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).flush(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = FlushSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Query" => {
#[allow(non_camel_case_types)]
struct QuerySvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::QueryRequest> for QuerySvc<T> {
type Response = super::QueryResults;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).query(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = QuerySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/CalcDistance" => {
#[allow(non_camel_case_types)]
struct CalcDistanceSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::CalcDistanceRequest>
for CalcDistanceSvc<T> {
type Response = super::CalcDistanceResults;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CalcDistanceRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).calc_distance(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CalcDistanceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetFlushState" => {
#[allow(non_camel_case_types)]
struct GetFlushStateSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetFlushStateRequest>
for GetFlushStateSvc<T> {
type Response = super::GetFlushStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetFlushStateRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_flush_state(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetFlushStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetPersistentSegmentInfo" => {
#[allow(non_camel_case_types)]
struct GetPersistentSegmentInfoSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetPersistentSegmentInfoRequest>
for GetPersistentSegmentInfoSvc<T> {
type Response = super::GetPersistentSegmentInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::GetPersistentSegmentInfoRequest,
>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_persistent_segment_info(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetPersistentSegmentInfoSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetQuerySegmentInfo" => {
#[allow(non_camel_case_types)]
struct GetQuerySegmentInfoSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetQuerySegmentInfoRequest>
for GetQuerySegmentInfoSvc<T> {
type Response = super::GetQuerySegmentInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetQuerySegmentInfoRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_query_segment_info(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetQuerySegmentInfoSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetReplicas" => {
#[allow(non_camel_case_types)]
struct GetReplicasSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetReplicasRequest>
for GetReplicasSvc<T> {
type Response = super::GetReplicasResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetReplicasRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_replicas(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetReplicasSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Dummy" => {
#[allow(non_camel_case_types)]
struct DummySvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DummyRequest> for DummySvc<T> {
type Response = super::DummyResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DummyRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).dummy(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DummySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/RegisterLink" => {
#[allow(non_camel_case_types)]
struct RegisterLinkSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::RegisterLinkRequest>
for RegisterLinkSvc<T> {
type Response = super::RegisterLinkResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RegisterLinkRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).register_link(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RegisterLinkSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetMetrics" => {
#[allow(non_camel_case_types)]
struct GetMetricsSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetMetricsRequest>
for GetMetricsSvc<T> {
type Response = super::GetMetricsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetMetricsRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).get_metrics(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetMetricsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/LoadBalance" => {
#[allow(non_camel_case_types)]
struct LoadBalanceSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::LoadBalanceRequest>
for LoadBalanceSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::LoadBalanceRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).load_balance(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = LoadBalanceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetCompactionState" => {
#[allow(non_camel_case_types)]
struct GetCompactionStateSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetCompactionStateRequest>
for GetCompactionStateSvc<T> {
type Response = super::GetCompactionStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetCompactionStateRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_compaction_state(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetCompactionStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ManualCompaction" => {
#[allow(non_camel_case_types)]
struct ManualCompactionSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ManualCompactionRequest>
for ManualCompactionSvc<T> {
type Response = super::ManualCompactionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ManualCompactionRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).manual_compaction(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ManualCompactionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetCompactionStateWithPlans" => {
#[allow(non_camel_case_types)]
struct GetCompactionStateWithPlansSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetCompactionPlansRequest>
for GetCompactionStateWithPlansSvc<T> {
type Response = super::GetCompactionPlansResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetCompactionPlansRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_compaction_state_with_plans(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetCompactionStateWithPlansSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/Import" => {
#[allow(non_camel_case_types)]
struct ImportSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ImportRequest>
for ImportSvc<T> {
type Response = super::ImportResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ImportRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move { (*inner).import(request).await };
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ImportSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/GetImportState" => {
#[allow(non_camel_case_types)]
struct GetImportStateSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::GetImportStateRequest>
for GetImportStateSvc<T> {
type Response = super::GetImportStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetImportStateRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).get_import_state(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = GetImportStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ListImportTasks" => {
#[allow(non_camel_case_types)]
struct ListImportTasksSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ListImportTasksRequest>
for ListImportTasksSvc<T> {
type Response = super::ListImportTasksResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListImportTasksRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).list_import_tasks(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListImportTasksSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/CreateCredential" => {
#[allow(non_camel_case_types)]
struct CreateCredentialSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::CreateCredentialRequest>
for CreateCredentialSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateCredentialRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).create_credential(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = CreateCredentialSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/UpdateCredential" => {
#[allow(non_camel_case_types)]
struct UpdateCredentialSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::UpdateCredentialRequest>
for UpdateCredentialSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::UpdateCredentialRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).update_credential(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = UpdateCredentialSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/DeleteCredential" => {
#[allow(non_camel_case_types)]
struct DeleteCredentialSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::DeleteCredentialRequest>
for DeleteCredentialSvc<T> {
type Response = super::super::common::Status;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteCredentialRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).delete_credential(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = DeleteCredentialSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/milvus.proto.milvus.MilvusService/ListCredUsers" => {
#[allow(non_camel_case_types)]
struct ListCredUsersSvc<T: MilvusService>(pub Arc<T>);
impl<
T: MilvusService,
> tonic::server::UnaryService<super::ListCredUsersRequest>
for ListCredUsersSvc<T> {
type Response = super::ListCredUsersResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListCredUsersRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).list_cred_users(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = ListCredUsersSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: MilvusService> Clone for MilvusServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: MilvusService> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: MilvusService> tonic::transport::NamedService for MilvusServiceServer<T> {
const NAME: &'static str = "milvus.proto.milvus.MilvusService";
}
}
pub mod proxy_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait ProxyService: Send + Sync + 'static {
async fn register_link(
&self,
request: tonic::Request<super::RegisterLinkRequest>,
) -> Result<tonic::Response<super::RegisterLinkResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct ProxyServiceServer<T: ProxyService> {
inner: _Inner<T>,
accept_compression_encodings: (),
send_compression_encodings: (),
}
struct _Inner<T>(Arc<T>);
impl<T: ProxyService> ProxyServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
let inner = _Inner(inner);
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for ProxyServiceServer<T>
where
T: ProxyService,
B: Body + Send + 'static,
B::Error: Into<StdError> + Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
"/milvus.proto.milvus.ProxyService/RegisterLink" => {
#[allow(non_camel_case_types)]
struct RegisterLinkSvc<T: ProxyService>(pub Arc<T>);
impl<
T: ProxyService,
> tonic::server::UnaryService<super::RegisterLinkRequest>
for RegisterLinkSvc<T> {
type Response = super::RegisterLinkResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RegisterLinkRequest>,
) -> Self::Future {
let inner = self.0.clone();
let fut = async move {
(*inner).register_link(request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let inner = self.inner.clone();
let fut = async move {
let inner = inner.0;
let method = RegisterLinkSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
Ok(
http::Response::builder()
.status(200)
.header("grpc-status", "12")
.header("content-type", "application/grpc")
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T: ProxyService> Clone for ProxyServiceServer<T> {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
inner,
accept_compression_encodings: self.accept_compression_encodings,
send_compression_encodings: self.send_compression_encodings,
}
}
}
impl<T: ProxyService> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self.0)
}
}
impl<T: ProxyService> tonic::transport::NamedService for ProxyServiceServer<T> {
const NAME: &'static str = "milvus.proto.milvus.ProxyService";
}
}