#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WaitVersion {
#[prost(uint64, tag = "1")]
pub catalog_version: u64,
#[prost(uint64, tag = "2")]
pub hummock_version_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseRequest {
#[prost(message, optional, tag = "1")]
pub db: ::core::option::Option<super::catalog::Database>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropDatabaseRequest {
#[prost(uint32, tag = "1")]
pub database_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropDatabaseResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSchemaRequest {
#[prost(message, optional, tag = "1")]
pub schema: ::core::option::Option<super::catalog::Schema>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSchemaResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropSchemaRequest {
#[prost(uint32, tag = "1")]
pub schema_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropSchemaResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSourceRequest {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<super::catalog::Source>,
#[prost(message, optional, tag = "2")]
pub fragment_graph: ::core::option::Option<super::stream_plan::StreamFragmentGraph>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSourceResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropSourceRequest {
#[prost(uint32, tag = "1")]
pub source_id: u32,
#[prost(bool, tag = "2")]
pub cascade: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropSourceResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterSourceRequest {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<super::catalog::Source>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterSourceResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSinkRequest {
#[prost(message, optional, tag = "1")]
pub sink: ::core::option::Option<super::catalog::Sink>,
#[prost(message, optional, tag = "2")]
pub fragment_graph: ::core::option::Option<super::stream_plan::StreamFragmentGraph>,
#[prost(message, optional, tag = "3")]
pub affected_table_change: ::core::option::Option<ReplaceTablePlan>,
#[prost(uint32, repeated, tag = "4")]
pub dependencies: ::prost::alloc::vec::Vec<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSinkResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropSinkRequest {
#[prost(uint32, tag = "1")]
pub sink_id: u32,
#[prost(bool, tag = "2")]
pub cascade: bool,
#[prost(message, optional, tag = "3")]
pub affected_table_change: ::core::option::Option<ReplaceTablePlan>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropSinkResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSubscriptionRequest {
#[prost(message, optional, tag = "1")]
pub subscription: ::core::option::Option<super::catalog::Subscription>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSubscriptionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropSubscriptionRequest {
#[prost(uint32, tag = "1")]
pub subscription_id: u32,
#[prost(bool, tag = "2")]
pub cascade: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropSubscriptionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMaterializedViewRequest {
#[prost(message, optional, tag = "1")]
pub materialized_view: ::core::option::Option<super::catalog::Table>,
#[prost(message, optional, tag = "2")]
pub fragment_graph: ::core::option::Option<super::stream_plan::StreamFragmentGraph>,
#[prost(enumeration = "create_materialized_view_request::BackfillType", tag = "3")]
pub backfill: i32,
#[prost(uint32, repeated, tag = "4")]
pub dependencies: ::prost::alloc::vec::Vec<u32>,
}
pub mod create_materialized_view_request {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BackfillType {
Unspecified = 0,
Regular = 1,
Serverless = 2,
}
impl BackfillType {
pub fn as_str_name(&self) -> &'static str {
match self {
BackfillType::Unspecified => "UNSPECIFIED",
BackfillType::Regular => "REGULAR",
BackfillType::Serverless => "SERVERLESS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"REGULAR" => Some(Self::Regular),
"SERVERLESS" => Some(Self::Serverless),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMaterializedViewResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropMaterializedViewRequest {
#[prost(uint32, tag = "1")]
pub table_id: u32,
#[prost(bool, tag = "2")]
pub cascade: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropMaterializedViewResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateViewRequest {
#[prost(message, optional, tag = "1")]
pub view: ::core::option::Option<super::catalog::View>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateViewResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropViewRequest {
#[prost(uint32, tag = "1")]
pub view_id: u32,
#[prost(bool, tag = "2")]
pub cascade: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropViewResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTableRequest {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<super::catalog::Source>,
#[prost(message, optional, tag = "2")]
pub materialized_view: ::core::option::Option<super::catalog::Table>,
#[prost(message, optional, tag = "3")]
pub fragment_graph: ::core::option::Option<super::stream_plan::StreamFragmentGraph>,
#[prost(enumeration = "TableJobType", tag = "4")]
pub job_type: i32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateTableResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterNameRequest {
#[prost(string, tag = "20")]
pub new_name: ::prost::alloc::string::String,
#[prost(oneof = "alter_name_request::Object", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
pub object: ::core::option::Option<alter_name_request::Object>,
}
pub mod alter_name_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Object {
#[prost(uint32, tag = "1")]
TableId(u32),
#[prost(uint32, tag = "2")]
ViewId(u32),
#[prost(uint32, tag = "3")]
IndexId(u32),
#[prost(uint32, tag = "4")]
SinkId(u32),
#[prost(uint32, tag = "5")]
SourceId(u32),
#[prost(uint32, tag = "6")]
SchemaId(u32),
#[prost(uint32, tag = "7")]
DatabaseId(u32),
#[prost(uint32, tag = "8")]
SubscriptionId(u32),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterNameResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlterOwnerRequest {
#[prost(uint32, tag = "20")]
pub owner_id: u32,
#[prost(oneof = "alter_owner_request::Object", tags = "1, 2, 3, 4, 5, 6, 7")]
pub object: ::core::option::Option<alter_owner_request::Object>,
}
pub mod alter_owner_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Object {
#[prost(uint32, tag = "1")]
TableId(u32),
#[prost(uint32, tag = "2")]
ViewId(u32),
#[prost(uint32, tag = "3")]
SourceId(u32),
#[prost(uint32, tag = "4")]
SinkId(u32),
#[prost(uint32, tag = "5")]
SchemaId(u32),
#[prost(uint32, tag = "6")]
DatabaseId(u32),
#[prost(uint32, tag = "7")]
SubscriptionId(u32),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlterSetSchemaRequest {
#[prost(uint32, tag = "20")]
pub new_schema_id: u32,
#[prost(oneof = "alter_set_schema_request::Object", tags = "1, 2, 3, 4, 5, 6, 7")]
pub object: ::core::option::Option<alter_set_schema_request::Object>,
}
pub mod alter_set_schema_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Object {
#[prost(uint32, tag = "1")]
TableId(u32),
#[prost(uint32, tag = "2")]
ViewId(u32),
#[prost(uint32, tag = "3")]
SourceId(u32),
#[prost(uint32, tag = "4")]
SinkId(u32),
#[prost(uint32, tag = "5")]
FunctionId(u32),
#[prost(uint32, tag = "6")]
ConnectionId(u32),
#[prost(uint32, tag = "7")]
SubscriptionId(u32),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterSetSchemaResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlterParallelismRequest {
#[prost(uint32, tag = "1")]
pub table_id: u32,
#[prost(message, optional, tag = "2")]
pub parallelism: ::core::option::Option<super::meta::TableParallelism>,
#[prost(bool, tag = "3")]
pub deferred: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlterParallelismResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterOwnerResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlterSwapRenameRequest {
#[prost(oneof = "alter_swap_rename_request::Object", tags = "1, 2, 3, 4, 5, 6")]
pub object: ::core::option::Option<alter_swap_rename_request::Object>,
}
pub mod alter_swap_rename_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ObjectNameSwapPair {
#[prost(uint32, tag = "1")]
pub src_object_id: u32,
#[prost(uint32, tag = "2")]
pub dst_object_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Object {
#[prost(message, tag = "1")]
Schema(ObjectNameSwapPair),
#[prost(message, tag = "2")]
Table(ObjectNameSwapPair),
#[prost(message, tag = "3")]
View(ObjectNameSwapPair),
#[prost(message, tag = "4")]
Source(ObjectNameSwapPair),
#[prost(message, tag = "5")]
Sink(ObjectNameSwapPair),
#[prost(message, tag = "6")]
Subscription(ObjectNameSwapPair),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterSwapRenameResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFunctionRequest {
#[prost(message, optional, tag = "1")]
pub function: ::core::option::Option<super::catalog::Function>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFunctionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropFunctionRequest {
#[prost(uint32, tag = "1")]
pub function_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropFunctionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropTableRequest {
#[prost(uint32, tag = "2")]
pub table_id: u32,
#[prost(bool, tag = "3")]
pub cascade: bool,
#[prost(oneof = "drop_table_request::SourceId", tags = "1")]
pub source_id: ::core::option::Option<drop_table_request::SourceId>,
}
pub mod drop_table_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum SourceId {
#[prost(uint32, tag = "1")]
Id(u32),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropTableResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RisectlListStateTablesRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RisectlListStateTablesResponse {
#[prost(message, repeated, tag = "1")]
pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIndexRequest {
#[prost(message, optional, tag = "1")]
pub index: ::core::option::Option<super::catalog::Index>,
#[prost(message, optional, tag = "2")]
pub index_table: ::core::option::Option<super::catalog::Table>,
#[prost(message, optional, tag = "3")]
pub fragment_graph: ::core::option::Option<super::stream_plan::StreamFragmentGraph>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIndexResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropIndexRequest {
#[prost(uint32, tag = "1")]
pub index_id: u32,
#[prost(bool, tag = "2")]
pub cascade: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropIndexResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceTablePlan {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<super::catalog::Table>,
#[prost(message, optional, tag = "2")]
pub fragment_graph: ::core::option::Option<super::stream_plan::StreamFragmentGraph>,
#[prost(message, optional, tag = "3")]
pub table_col_index_mapping: ::core::option::Option<super::catalog::ColIndexMapping>,
#[prost(message, optional, tag = "4")]
pub source: ::core::option::Option<super::catalog::Source>,
#[prost(enumeration = "TableJobType", tag = "5")]
pub job_type: i32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceTablePlanRequest {
#[prost(message, optional, tag = "1")]
pub plan: ::core::option::Option<ReplaceTablePlan>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceTablePlanResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTableRequest {
#[prost(string, tag = "1")]
pub database_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub table_name: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTableResponse {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<super::catalog::Table>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetDdlProgressRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DdlProgress {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(string, tag = "2")]
pub statement: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub progress: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDdlProgressResponse {
#[prost(message, repeated, tag = "1")]
pub ddl_progress: ::prost::alloc::vec::Vec<DdlProgress>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSecretRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub value: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub database_id: u32,
#[prost(uint32, tag = "4")]
pub schema_id: u32,
#[prost(uint32, tag = "5")]
pub owner_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateSecretResponse {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropSecretRequest {
#[prost(uint32, tag = "1")]
pub secret_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropSecretResponse {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConnectionRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub database_id: u32,
#[prost(uint32, tag = "3")]
pub schema_id: u32,
#[prost(uint32, tag = "5")]
pub owner_id: u32,
#[prost(oneof = "create_connection_request::Payload", tags = "4")]
pub payload: ::core::option::Option<create_connection_request::Payload>,
}
pub mod create_connection_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateLink {
#[prost(
enumeration = "super::super::catalog::connection::private_link_service::PrivateLinkProvider",
tag = "1"
)]
pub provider: i32,
#[prost(string, tag = "2")]
pub service_name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub tags: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag = "4")]
PrivateLink(PrivateLink),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreateConnectionResponse {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListConnectionsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConnectionsResponse {
#[prost(message, repeated, tag = "1")]
pub connections: ::prost::alloc::vec::Vec<super::catalog::Connection>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropConnectionRequest {
#[prost(uint32, tag = "1")]
pub connection_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropConnectionResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTablesRequest {
#[prost(uint32, repeated, tag = "1")]
pub table_ids: ::prost::alloc::vec::Vec<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTablesResponse {
#[prost(map = "uint32, message", tag = "1")]
pub tables: ::std::collections::HashMap<u32, super::catalog::Table>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WaitRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WaitResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommentOnRequest {
#[prost(message, optional, tag = "1")]
pub comment: ::core::option::Option<super::catalog::Comment>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommentOnResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, optional, tag = "2")]
pub version: ::core::option::Option<WaitVersion>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableSchemaChange {
#[prost(enumeration = "table_schema_change::TableChangeType", tag = "1")]
pub change_type: i32,
#[prost(string, tag = "2")]
pub cdc_table_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
#[prost(string, tag = "4")]
pub upstream_ddl: ::prost::alloc::string::String,
}
pub mod table_schema_change {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TableChangeType {
Unspecified = 0,
Alter = 1,
Create = 2,
Drop = 3,
}
impl TableChangeType {
pub fn as_str_name(&self) -> &'static str {
match self {
TableChangeType::Unspecified => "UNSPECIFIED",
TableChangeType::Alter => "ALTER",
TableChangeType::Create => "CREATE",
TableChangeType::Drop => "DROP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"ALTER" => Some(Self::Alter),
"CREATE" => Some(Self::Create),
"DROP" => Some(Self::Drop),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SchemaChangeEnvelope {
#[prost(message, repeated, tag = "1")]
pub table_changes: ::prost::alloc::vec::Vec<TableSchemaChange>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AutoSchemaChangeRequest {
#[prost(message, optional, tag = "1")]
pub schema_change: ::core::option::Option<SchemaChangeEnvelope>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AutoSchemaChangeResponse {}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TableJobType {
Unspecified = 0,
General = 1,
SharedCdcSource = 2,
}
impl TableJobType {
pub fn as_str_name(&self) -> &'static str {
match self {
TableJobType::Unspecified => "TABLE_JOB_TYPE_UNSPECIFIED",
TableJobType::General => "TABLE_JOB_TYPE_GENERAL",
TableJobType::SharedCdcSource => "TABLE_JOB_TYPE_SHARED_CDC_SOURCE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TABLE_JOB_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TABLE_JOB_TYPE_GENERAL" => Some(Self::General),
"TABLE_JOB_TYPE_SHARED_CDC_SOURCE" => Some(Self::SharedCdcSource),
_ => None,
}
}
}
pub mod ddl_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DdlServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DdlServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DdlServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DdlServiceClient<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> + std::marker::Send + std::marker::Sync,
{
DdlServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_database(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::CreateDatabaseResponse>,
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(
"/ddl_service.DdlService/CreateDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateDatabase"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_database(
&mut self,
request: impl tonic::IntoRequest<super::DropDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::DropDatabaseResponse>,
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(
"/ddl_service.DdlService/DropDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropDatabase"));
self.inner.unary(req, path, codec).await
}
pub async fn create_schema(
&mut self,
request: impl tonic::IntoRequest<super::CreateSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSchemaResponse>,
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(
"/ddl_service.DdlService/CreateSchema",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateSchema"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_schema(
&mut self,
request: impl tonic::IntoRequest<super::DropSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::DropSchemaResponse>,
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(
"/ddl_service.DdlService/DropSchema",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropSchema"));
self.inner.unary(req, path, codec).await
}
pub async fn create_source(
&mut self,
request: impl tonic::IntoRequest<super::CreateSourceRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSourceResponse>,
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(
"/ddl_service.DdlService/CreateSource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateSource"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_source(
&mut self,
request: impl tonic::IntoRequest<super::DropSourceRequest>,
) -> std::result::Result<
tonic::Response<super::DropSourceResponse>,
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(
"/ddl_service.DdlService/DropSource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropSource"));
self.inner.unary(req, path, codec).await
}
pub async fn create_sink(
&mut self,
request: impl tonic::IntoRequest<super::CreateSinkRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSinkResponse>,
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(
"/ddl_service.DdlService/CreateSink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateSink"));
self.inner.unary(req, path, codec).await
}
pub async fn create_subscription(
&mut self,
request: impl tonic::IntoRequest<super::CreateSubscriptionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSubscriptionResponse>,
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(
"/ddl_service.DdlService/CreateSubscription",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateSubscription"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_sink(
&mut self,
request: impl tonic::IntoRequest<super::DropSinkRequest>,
) -> std::result::Result<
tonic::Response<super::DropSinkResponse>,
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(
"/ddl_service.DdlService/DropSink",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropSink"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_subscription(
&mut self,
request: impl tonic::IntoRequest<super::DropSubscriptionRequest>,
) -> std::result::Result<
tonic::Response<super::DropSubscriptionResponse>,
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(
"/ddl_service.DdlService/DropSubscription",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropSubscription"));
self.inner.unary(req, path, codec).await
}
pub async fn create_materialized_view(
&mut self,
request: impl tonic::IntoRequest<super::CreateMaterializedViewRequest>,
) -> std::result::Result<
tonic::Response<super::CreateMaterializedViewResponse>,
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(
"/ddl_service.DdlService/CreateMaterializedView",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ddl_service.DdlService", "CreateMaterializedView"),
);
self.inner.unary(req, path, codec).await
}
pub async fn drop_materialized_view(
&mut self,
request: impl tonic::IntoRequest<super::DropMaterializedViewRequest>,
) -> std::result::Result<
tonic::Response<super::DropMaterializedViewResponse>,
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(
"/ddl_service.DdlService/DropMaterializedView",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ddl_service.DdlService", "DropMaterializedView"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_table(
&mut self,
request: impl tonic::IntoRequest<super::CreateTableRequest>,
) -> std::result::Result<
tonic::Response<super::CreateTableResponse>,
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(
"/ddl_service.DdlService/CreateTable",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateTable"));
self.inner.unary(req, path, codec).await
}
pub async fn create_secret(
&mut self,
request: impl tonic::IntoRequest<super::CreateSecretRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSecretResponse>,
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(
"/ddl_service.DdlService/CreateSecret",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateSecret"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_secret(
&mut self,
request: impl tonic::IntoRequest<super::DropSecretRequest>,
) -> std::result::Result<
tonic::Response<super::DropSecretResponse>,
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(
"/ddl_service.DdlService/DropSecret",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropSecret"));
self.inner.unary(req, path, codec).await
}
pub async fn alter_name(
&mut self,
request: impl tonic::IntoRequest<super::AlterNameRequest>,
) -> std::result::Result<
tonic::Response<super::AlterNameResponse>,
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(
"/ddl_service.DdlService/AlterName",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AlterName"));
self.inner.unary(req, path, codec).await
}
pub async fn alter_source(
&mut self,
request: impl tonic::IntoRequest<super::AlterSourceRequest>,
) -> std::result::Result<
tonic::Response<super::AlterSourceResponse>,
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(
"/ddl_service.DdlService/AlterSource",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AlterSource"));
self.inner.unary(req, path, codec).await
}
pub async fn alter_owner(
&mut self,
request: impl tonic::IntoRequest<super::AlterOwnerRequest>,
) -> std::result::Result<
tonic::Response<super::AlterOwnerResponse>,
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(
"/ddl_service.DdlService/AlterOwner",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AlterOwner"));
self.inner.unary(req, path, codec).await
}
pub async fn alter_set_schema(
&mut self,
request: impl tonic::IntoRequest<super::AlterSetSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::AlterSetSchemaResponse>,
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(
"/ddl_service.DdlService/AlterSetSchema",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AlterSetSchema"));
self.inner.unary(req, path, codec).await
}
pub async fn alter_parallelism(
&mut self,
request: impl tonic::IntoRequest<super::AlterParallelismRequest>,
) -> std::result::Result<
tonic::Response<super::AlterParallelismResponse>,
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(
"/ddl_service.DdlService/AlterParallelism",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AlterParallelism"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_table(
&mut self,
request: impl tonic::IntoRequest<super::DropTableRequest>,
) -> std::result::Result<
tonic::Response<super::DropTableResponse>,
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(
"/ddl_service.DdlService/DropTable",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropTable"));
self.inner.unary(req, path, codec).await
}
pub async fn risectl_list_state_tables(
&mut self,
request: impl tonic::IntoRequest<super::RisectlListStateTablesRequest>,
) -> std::result::Result<
tonic::Response<super::RisectlListStateTablesResponse>,
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(
"/ddl_service.DdlService/RisectlListStateTables",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("ddl_service.DdlService", "RisectlListStateTables"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_view(
&mut self,
request: impl tonic::IntoRequest<super::CreateViewRequest>,
) -> std::result::Result<
tonic::Response<super::CreateViewResponse>,
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(
"/ddl_service.DdlService/CreateView",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateView"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_view(
&mut self,
request: impl tonic::IntoRequest<super::DropViewRequest>,
) -> std::result::Result<
tonic::Response<super::DropViewResponse>,
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(
"/ddl_service.DdlService/DropView",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropView"));
self.inner.unary(req, path, codec).await
}
pub async fn create_index(
&mut self,
request: impl tonic::IntoRequest<super::CreateIndexRequest>,
) -> std::result::Result<
tonic::Response<super::CreateIndexResponse>,
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(
"/ddl_service.DdlService/CreateIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateIndex"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_index(
&mut self,
request: impl tonic::IntoRequest<super::DropIndexRequest>,
) -> std::result::Result<
tonic::Response<super::DropIndexResponse>,
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(
"/ddl_service.DdlService/DropIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropIndex"));
self.inner.unary(req, path, codec).await
}
pub async fn create_function(
&mut self,
request: impl tonic::IntoRequest<super::CreateFunctionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateFunctionResponse>,
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(
"/ddl_service.DdlService/CreateFunction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateFunction"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_function(
&mut self,
request: impl tonic::IntoRequest<super::DropFunctionRequest>,
) -> std::result::Result<
tonic::Response<super::DropFunctionResponse>,
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(
"/ddl_service.DdlService/DropFunction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropFunction"));
self.inner.unary(req, path, codec).await
}
pub async fn replace_table_plan(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceTablePlanRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceTablePlanResponse>,
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(
"/ddl_service.DdlService/ReplaceTablePlan",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "ReplaceTablePlan"));
self.inner.unary(req, path, codec).await
}
pub async fn get_table(
&mut self,
request: impl tonic::IntoRequest<super::GetTableRequest>,
) -> std::result::Result<
tonic::Response<super::GetTableResponse>,
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(
"/ddl_service.DdlService/GetTable",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "GetTable"));
self.inner.unary(req, path, codec).await
}
pub async fn get_ddl_progress(
&mut self,
request: impl tonic::IntoRequest<super::GetDdlProgressRequest>,
) -> std::result::Result<
tonic::Response<super::GetDdlProgressResponse>,
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(
"/ddl_service.DdlService/GetDdlProgress",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "GetDdlProgress"));
self.inner.unary(req, path, codec).await
}
pub async fn create_connection(
&mut self,
request: impl tonic::IntoRequest<super::CreateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateConnectionResponse>,
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(
"/ddl_service.DdlService/CreateConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CreateConnection"));
self.inner.unary(req, path, codec).await
}
pub async fn list_connections(
&mut self,
request: impl tonic::IntoRequest<super::ListConnectionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListConnectionsResponse>,
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(
"/ddl_service.DdlService/ListConnections",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "ListConnections"));
self.inner.unary(req, path, codec).await
}
pub async fn drop_connection(
&mut self,
request: impl tonic::IntoRequest<super::DropConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::DropConnectionResponse>,
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(
"/ddl_service.DdlService/DropConnection",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "DropConnection"));
self.inner.unary(req, path, codec).await
}
pub async fn get_tables(
&mut self,
request: impl tonic::IntoRequest<super::GetTablesRequest>,
) -> std::result::Result<
tonic::Response<super::GetTablesResponse>,
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(
"/ddl_service.DdlService/GetTables",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "GetTables"));
self.inner.unary(req, path, codec).await
}
pub async fn wait(
&mut self,
request: impl tonic::IntoRequest<super::WaitRequest>,
) -> std::result::Result<tonic::Response<super::WaitResponse>, 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(
"/ddl_service.DdlService/Wait",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "Wait"));
self.inner.unary(req, path, codec).await
}
pub async fn comment_on(
&mut self,
request: impl tonic::IntoRequest<super::CommentOnRequest>,
) -> std::result::Result<
tonic::Response<super::CommentOnResponse>,
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(
"/ddl_service.DdlService/CommentOn",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "CommentOn"));
self.inner.unary(req, path, codec).await
}
pub async fn auto_schema_change(
&mut self,
request: impl tonic::IntoRequest<super::AutoSchemaChangeRequest>,
) -> std::result::Result<
tonic::Response<super::AutoSchemaChangeResponse>,
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(
"/ddl_service.DdlService/AutoSchemaChange",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AutoSchemaChange"));
self.inner.unary(req, path, codec).await
}
pub async fn alter_swap_rename(
&mut self,
request: impl tonic::IntoRequest<super::AlterSwapRenameRequest>,
) -> std::result::Result<
tonic::Response<super::AlterSwapRenameResponse>,
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(
"/ddl_service.DdlService/AlterSwapRename",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("ddl_service.DdlService", "AlterSwapRename"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod ddl_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait DdlService: std::marker::Send + std::marker::Sync + 'static {
async fn create_database(
&self,
request: tonic::Request<super::CreateDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::CreateDatabaseResponse>,
tonic::Status,
>;
async fn drop_database(
&self,
request: tonic::Request<super::DropDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::DropDatabaseResponse>,
tonic::Status,
>;
async fn create_schema(
&self,
request: tonic::Request<super::CreateSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSchemaResponse>,
tonic::Status,
>;
async fn drop_schema(
&self,
request: tonic::Request<super::DropSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::DropSchemaResponse>,
tonic::Status,
>;
async fn create_source(
&self,
request: tonic::Request<super::CreateSourceRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSourceResponse>,
tonic::Status,
>;
async fn drop_source(
&self,
request: tonic::Request<super::DropSourceRequest>,
) -> std::result::Result<
tonic::Response<super::DropSourceResponse>,
tonic::Status,
>;
async fn create_sink(
&self,
request: tonic::Request<super::CreateSinkRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSinkResponse>,
tonic::Status,
>;
async fn create_subscription(
&self,
request: tonic::Request<super::CreateSubscriptionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSubscriptionResponse>,
tonic::Status,
>;
async fn drop_sink(
&self,
request: tonic::Request<super::DropSinkRequest>,
) -> std::result::Result<
tonic::Response<super::DropSinkResponse>,
tonic::Status,
>;
async fn drop_subscription(
&self,
request: tonic::Request<super::DropSubscriptionRequest>,
) -> std::result::Result<
tonic::Response<super::DropSubscriptionResponse>,
tonic::Status,
>;
async fn create_materialized_view(
&self,
request: tonic::Request<super::CreateMaterializedViewRequest>,
) -> std::result::Result<
tonic::Response<super::CreateMaterializedViewResponse>,
tonic::Status,
>;
async fn drop_materialized_view(
&self,
request: tonic::Request<super::DropMaterializedViewRequest>,
) -> std::result::Result<
tonic::Response<super::DropMaterializedViewResponse>,
tonic::Status,
>;
async fn create_table(
&self,
request: tonic::Request<super::CreateTableRequest>,
) -> std::result::Result<
tonic::Response<super::CreateTableResponse>,
tonic::Status,
>;
async fn create_secret(
&self,
request: tonic::Request<super::CreateSecretRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSecretResponse>,
tonic::Status,
>;
async fn drop_secret(
&self,
request: tonic::Request<super::DropSecretRequest>,
) -> std::result::Result<
tonic::Response<super::DropSecretResponse>,
tonic::Status,
>;
async fn alter_name(
&self,
request: tonic::Request<super::AlterNameRequest>,
) -> std::result::Result<
tonic::Response<super::AlterNameResponse>,
tonic::Status,
>;
async fn alter_source(
&self,
request: tonic::Request<super::AlterSourceRequest>,
) -> std::result::Result<
tonic::Response<super::AlterSourceResponse>,
tonic::Status,
>;
async fn alter_owner(
&self,
request: tonic::Request<super::AlterOwnerRequest>,
) -> std::result::Result<
tonic::Response<super::AlterOwnerResponse>,
tonic::Status,
>;
async fn alter_set_schema(
&self,
request: tonic::Request<super::AlterSetSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::AlterSetSchemaResponse>,
tonic::Status,
>;
async fn alter_parallelism(
&self,
request: tonic::Request<super::AlterParallelismRequest>,
) -> std::result::Result<
tonic::Response<super::AlterParallelismResponse>,
tonic::Status,
>;
async fn drop_table(
&self,
request: tonic::Request<super::DropTableRequest>,
) -> std::result::Result<
tonic::Response<super::DropTableResponse>,
tonic::Status,
>;
async fn risectl_list_state_tables(
&self,
request: tonic::Request<super::RisectlListStateTablesRequest>,
) -> std::result::Result<
tonic::Response<super::RisectlListStateTablesResponse>,
tonic::Status,
>;
async fn create_view(
&self,
request: tonic::Request<super::CreateViewRequest>,
) -> std::result::Result<
tonic::Response<super::CreateViewResponse>,
tonic::Status,
>;
async fn drop_view(
&self,
request: tonic::Request<super::DropViewRequest>,
) -> std::result::Result<
tonic::Response<super::DropViewResponse>,
tonic::Status,
>;
async fn create_index(
&self,
request: tonic::Request<super::CreateIndexRequest>,
) -> std::result::Result<
tonic::Response<super::CreateIndexResponse>,
tonic::Status,
>;
async fn drop_index(
&self,
request: tonic::Request<super::DropIndexRequest>,
) -> std::result::Result<
tonic::Response<super::DropIndexResponse>,
tonic::Status,
>;
async fn create_function(
&self,
request: tonic::Request<super::CreateFunctionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateFunctionResponse>,
tonic::Status,
>;
async fn drop_function(
&self,
request: tonic::Request<super::DropFunctionRequest>,
) -> std::result::Result<
tonic::Response<super::DropFunctionResponse>,
tonic::Status,
>;
async fn replace_table_plan(
&self,
request: tonic::Request<super::ReplaceTablePlanRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceTablePlanResponse>,
tonic::Status,
>;
async fn get_table(
&self,
request: tonic::Request<super::GetTableRequest>,
) -> std::result::Result<
tonic::Response<super::GetTableResponse>,
tonic::Status,
>;
async fn get_ddl_progress(
&self,
request: tonic::Request<super::GetDdlProgressRequest>,
) -> std::result::Result<
tonic::Response<super::GetDdlProgressResponse>,
tonic::Status,
>;
async fn create_connection(
&self,
request: tonic::Request<super::CreateConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateConnectionResponse>,
tonic::Status,
>;
async fn list_connections(
&self,
request: tonic::Request<super::ListConnectionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListConnectionsResponse>,
tonic::Status,
>;
async fn drop_connection(
&self,
request: tonic::Request<super::DropConnectionRequest>,
) -> std::result::Result<
tonic::Response<super::DropConnectionResponse>,
tonic::Status,
>;
async fn get_tables(
&self,
request: tonic::Request<super::GetTablesRequest>,
) -> std::result::Result<
tonic::Response<super::GetTablesResponse>,
tonic::Status,
>;
async fn wait(
&self,
request: tonic::Request<super::WaitRequest>,
) -> std::result::Result<tonic::Response<super::WaitResponse>, tonic::Status>;
async fn comment_on(
&self,
request: tonic::Request<super::CommentOnRequest>,
) -> std::result::Result<
tonic::Response<super::CommentOnResponse>,
tonic::Status,
>;
async fn auto_schema_change(
&self,
request: tonic::Request<super::AutoSchemaChangeRequest>,
) -> std::result::Result<
tonic::Response<super::AutoSchemaChangeResponse>,
tonic::Status,
>;
async fn alter_swap_rename(
&self,
request: tonic::Request<super::AlterSwapRenameRequest>,
) -> std::result::Result<
tonic::Response<super::AlterSwapRenameResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct DdlServiceServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> DdlServiceServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for DdlServiceServer<T>
where
T: DdlService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::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<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/ddl_service.DdlService/CreateDatabase" => {
#[allow(non_camel_case_types)]
struct CreateDatabaseSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateDatabaseRequest>
for CreateDatabaseSvc<T> {
type Response = super::CreateDatabaseResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateDatabaseRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_database(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateDatabaseSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropDatabase" => {
#[allow(non_camel_case_types)]
struct DropDatabaseSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropDatabaseRequest>
for DropDatabaseSvc<T> {
type Response = super::DropDatabaseResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropDatabaseRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_database(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropDatabaseSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateSchema" => {
#[allow(non_camel_case_types)]
struct CreateSchemaSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateSchemaRequest>
for CreateSchemaSvc<T> {
type Response = super::CreateSchemaResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateSchemaRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_schema(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSchemaSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropSchema" => {
#[allow(non_camel_case_types)]
struct DropSchemaSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropSchemaRequest>
for DropSchemaSvc<T> {
type Response = super::DropSchemaResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropSchemaRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_schema(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropSchemaSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateSource" => {
#[allow(non_camel_case_types)]
struct CreateSourceSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateSourceRequest>
for CreateSourceSvc<T> {
type Response = super::CreateSourceResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateSourceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_source(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSourceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropSource" => {
#[allow(non_camel_case_types)]
struct DropSourceSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropSourceRequest>
for DropSourceSvc<T> {
type Response = super::DropSourceResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropSourceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_source(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropSourceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateSink" => {
#[allow(non_camel_case_types)]
struct CreateSinkSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateSinkRequest>
for CreateSinkSvc<T> {
type Response = super::CreateSinkResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateSinkRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_sink(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSinkSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateSubscription" => {
#[allow(non_camel_case_types)]
struct CreateSubscriptionSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateSubscriptionRequest>
for CreateSubscriptionSvc<T> {
type Response = super::CreateSubscriptionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateSubscriptionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_subscription(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSubscriptionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropSink" => {
#[allow(non_camel_case_types)]
struct DropSinkSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropSinkRequest>
for DropSinkSvc<T> {
type Response = super::DropSinkResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropSinkRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_sink(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropSinkSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropSubscription" => {
#[allow(non_camel_case_types)]
struct DropSubscriptionSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropSubscriptionRequest>
for DropSubscriptionSvc<T> {
type Response = super::DropSubscriptionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropSubscriptionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_subscription(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropSubscriptionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateMaterializedView" => {
#[allow(non_camel_case_types)]
struct CreateMaterializedViewSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateMaterializedViewRequest>
for CreateMaterializedViewSvc<T> {
type Response = super::CreateMaterializedViewResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateMaterializedViewRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_materialized_view(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateMaterializedViewSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropMaterializedView" => {
#[allow(non_camel_case_types)]
struct DropMaterializedViewSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropMaterializedViewRequest>
for DropMaterializedViewSvc<T> {
type Response = super::DropMaterializedViewResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropMaterializedViewRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_materialized_view(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropMaterializedViewSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateTable" => {
#[allow(non_camel_case_types)]
struct CreateTableSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateTableRequest>
for CreateTableSvc<T> {
type Response = super::CreateTableResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateTableRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_table(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateTableSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateSecret" => {
#[allow(non_camel_case_types)]
struct CreateSecretSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateSecretRequest>
for CreateSecretSvc<T> {
type Response = super::CreateSecretResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateSecretRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_secret(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateSecretSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropSecret" => {
#[allow(non_camel_case_types)]
struct DropSecretSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropSecretRequest>
for DropSecretSvc<T> {
type Response = super::DropSecretResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropSecretRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_secret(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropSecretSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AlterName" => {
#[allow(non_camel_case_types)]
struct AlterNameSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AlterNameRequest>
for AlterNameSvc<T> {
type Response = super::AlterNameResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterNameRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::alter_name(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AlterNameSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AlterSource" => {
#[allow(non_camel_case_types)]
struct AlterSourceSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AlterSourceRequest>
for AlterSourceSvc<T> {
type Response = super::AlterSourceResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterSourceRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::alter_source(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AlterSourceSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AlterOwner" => {
#[allow(non_camel_case_types)]
struct AlterOwnerSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AlterOwnerRequest>
for AlterOwnerSvc<T> {
type Response = super::AlterOwnerResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterOwnerRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::alter_owner(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AlterOwnerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AlterSetSchema" => {
#[allow(non_camel_case_types)]
struct AlterSetSchemaSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AlterSetSchemaRequest>
for AlterSetSchemaSvc<T> {
type Response = super::AlterSetSchemaResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterSetSchemaRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::alter_set_schema(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AlterSetSchemaSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AlterParallelism" => {
#[allow(non_camel_case_types)]
struct AlterParallelismSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AlterParallelismRequest>
for AlterParallelismSvc<T> {
type Response = super::AlterParallelismResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterParallelismRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::alter_parallelism(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AlterParallelismSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropTable" => {
#[allow(non_camel_case_types)]
struct DropTableSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropTableRequest>
for DropTableSvc<T> {
type Response = super::DropTableResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropTableRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_table(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropTableSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/RisectlListStateTables" => {
#[allow(non_camel_case_types)]
struct RisectlListStateTablesSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::RisectlListStateTablesRequest>
for RisectlListStateTablesSvc<T> {
type Response = super::RisectlListStateTablesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RisectlListStateTablesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::risectl_list_state_tables(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RisectlListStateTablesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateView" => {
#[allow(non_camel_case_types)]
struct CreateViewSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateViewRequest>
for CreateViewSvc<T> {
type Response = super::CreateViewResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateViewRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_view(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateViewSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropView" => {
#[allow(non_camel_case_types)]
struct DropViewSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropViewRequest>
for DropViewSvc<T> {
type Response = super::DropViewResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropViewRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_view(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropViewSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateIndex" => {
#[allow(non_camel_case_types)]
struct CreateIndexSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateIndexRequest>
for CreateIndexSvc<T> {
type Response = super::CreateIndexResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateIndexRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_index(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
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,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropIndex" => {
#[allow(non_camel_case_types)]
struct DropIndexSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropIndexRequest>
for DropIndexSvc<T> {
type Response = super::DropIndexResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropIndexRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_index(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
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,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateFunction" => {
#[allow(non_camel_case_types)]
struct CreateFunctionSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateFunctionRequest>
for CreateFunctionSvc<T> {
type Response = super::CreateFunctionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateFunctionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_function(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateFunctionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropFunction" => {
#[allow(non_camel_case_types)]
struct DropFunctionSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropFunctionRequest>
for DropFunctionSvc<T> {
type Response = super::DropFunctionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropFunctionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_function(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropFunctionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/ReplaceTablePlan" => {
#[allow(non_camel_case_types)]
struct ReplaceTablePlanSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::ReplaceTablePlanRequest>
for ReplaceTablePlanSvc<T> {
type Response = super::ReplaceTablePlanResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ReplaceTablePlanRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::replace_table_plan(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ReplaceTablePlanSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/GetTable" => {
#[allow(non_camel_case_types)]
struct GetTableSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::GetTableRequest>
for GetTableSvc<T> {
type Response = super::GetTableResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTableRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::get_table(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetTableSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/GetDdlProgress" => {
#[allow(non_camel_case_types)]
struct GetDdlProgressSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::GetDdlProgressRequest>
for GetDdlProgressSvc<T> {
type Response = super::GetDdlProgressResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetDdlProgressRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::get_ddl_progress(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetDdlProgressSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CreateConnection" => {
#[allow(non_camel_case_types)]
struct CreateConnectionSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CreateConnectionRequest>
for CreateConnectionSvc<T> {
type Response = super::CreateConnectionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CreateConnectionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::create_connection(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateConnectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/ListConnections" => {
#[allow(non_camel_case_types)]
struct ListConnectionsSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::ListConnectionsRequest>
for ListConnectionsSvc<T> {
type Response = super::ListConnectionsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListConnectionsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::list_connections(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ListConnectionsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/DropConnection" => {
#[allow(non_camel_case_types)]
struct DropConnectionSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::DropConnectionRequest>
for DropConnectionSvc<T> {
type Response = super::DropConnectionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DropConnectionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::drop_connection(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = DropConnectionSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/GetTables" => {
#[allow(non_camel_case_types)]
struct GetTablesSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::GetTablesRequest>
for GetTablesSvc<T> {
type Response = super::GetTablesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTablesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::get_tables(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = GetTablesSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/Wait" => {
#[allow(non_camel_case_types)]
struct WaitSvc<T: DdlService>(pub Arc<T>);
impl<T: DdlService> tonic::server::UnaryService<super::WaitRequest>
for WaitSvc<T> {
type Response = super::WaitResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::WaitRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::wait(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = WaitSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/CommentOn" => {
#[allow(non_camel_case_types)]
struct CommentOnSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::CommentOnRequest>
for CommentOnSvc<T> {
type Response = super::CommentOnResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CommentOnRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::comment_on(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CommentOnSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AutoSchemaChange" => {
#[allow(non_camel_case_types)]
struct AutoSchemaChangeSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AutoSchemaChangeRequest>
for AutoSchemaChangeSvc<T> {
type Response = super::AutoSchemaChangeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AutoSchemaChangeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::auto_schema_change(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AutoSchemaChangeSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/ddl_service.DdlService/AlterSwapRename" => {
#[allow(non_camel_case_types)]
struct AlterSwapRenameSvc<T: DdlService>(pub Arc<T>);
impl<
T: DdlService,
> tonic::server::UnaryService<super::AlterSwapRenameRequest>
for AlterSwapRenameSvc<T> {
type Response = super::AlterSwapRenameResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AlterSwapRenameRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as DdlService>::alter_swap_rename(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AlterSwapRenameSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
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", tonic::Code::Unimplemented as i32)
.header(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
)
.body(empty_body())
.unwrap(),
)
})
}
}
}
}
impl<T> Clone for DdlServiceServer<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,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "ddl_service.DdlService";
impl<T> tonic::server::NamedService for DdlServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}