#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetTelemetryInfoRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TelemetryInfoResponse {
#[prost(string, optional, tag = "1")]
pub tracking_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HeartbeatRequest {
#[prost(uint32, tag = "1")]
pub node_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeartbeatResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableFragments {
#[prost(uint32, tag = "1")]
pub table_id: u32,
#[prost(enumeration = "table_fragments::State", tag = "2")]
pub state: i32,
#[prost(map = "uint32, message", tag = "3")]
pub fragments: ::std::collections::HashMap<u32, table_fragments::Fragment>,
#[prost(map = "uint32, message", tag = "4")]
pub actor_status: ::std::collections::HashMap<u32, table_fragments::ActorStatus>,
#[prost(map = "uint32, message", tag = "5")]
pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
#[prost(message, optional, tag = "6")]
pub ctx: ::core::option::Option<super::stream_plan::StreamContext>,
#[prost(message, optional, tag = "7")]
pub parallelism: ::core::option::Option<TableParallelism>,
#[prost(uint32, optional, tag = "10")]
pub max_parallelism: ::core::option::Option<u32>,
#[prost(string, tag = "8")]
pub node_label: ::prost::alloc::string::String,
#[prost(bool, tag = "9")]
pub backfill_done: bool,
}
pub mod table_fragments {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ActorStatus {
#[prost(message, optional, tag = "1")]
pub location: ::core::option::Option<super::super::common::ActorLocation>,
#[prost(enumeration = "actor_status::ActorState", tag = "2")]
pub state: i32,
}
pub mod actor_status {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ActorState {
Unspecified = 0,
Inactive = 1,
Running = 2,
}
impl ActorState {
pub fn as_str_name(&self) -> &'static str {
match self {
ActorState::Unspecified => "UNSPECIFIED",
ActorState::Inactive => "INACTIVE",
ActorState::Running => "RUNNING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"INACTIVE" => Some(Self::Inactive),
"RUNNING" => Some(Self::Running),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fragment {
#[prost(uint32, tag = "1")]
pub fragment_id: u32,
#[prost(uint32, tag = "2")]
pub fragment_type_mask: u32,
#[prost(enumeration = "fragment::FragmentDistributionType", tag = "3")]
pub distribution_type: i32,
#[prost(message, repeated, tag = "4")]
pub actors: ::prost::alloc::vec::Vec<super::super::stream_plan::StreamActor>,
#[prost(uint32, repeated, tag = "6")]
pub state_table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, repeated, tag = "7")]
pub upstream_fragment_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, optional, tag = "8")]
pub maybe_vnode_count: ::core::option::Option<u32>,
}
pub mod fragment {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FragmentDistributionType {
Unspecified = 0,
Single = 1,
Hash = 2,
}
impl FragmentDistributionType {
pub fn as_str_name(&self) -> &'static str {
match self {
FragmentDistributionType::Unspecified => "UNSPECIFIED",
FragmentDistributionType::Single => "SINGLE",
FragmentDistributionType::Hash => "HASH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"SINGLE" => Some(Self::Single),
"HASH" => Some(Self::Hash),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Initial = 1,
Creating = 2,
Created = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "UNSPECIFIED",
State::Initial => "INITIAL",
State::Creating => "CREATING",
State::Created => "CREATED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"INITIAL" => Some(Self::Initial),
"CREATING" => Some(Self::Creating),
"CREATED" => Some(Self::Created),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentWorkerSlotMapping {
#[prost(uint32, tag = "1")]
pub fragment_id: u32,
#[prost(message, optional, tag = "2")]
pub mapping: ::core::option::Option<super::common::WorkerSlotMapping>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentWorkerSlotMappings {
#[prost(message, repeated, tag = "1")]
pub mappings: ::prost::alloc::vec::Vec<FragmentWorkerSlotMapping>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActorLocation {
#[prost(message, optional, tag = "1")]
pub node: ::core::option::Option<super::common::WorkerNode>,
#[prost(message, repeated, tag = "2")]
pub actors: ::prost::alloc::vec::Vec<super::stream_plan::StreamActor>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationPlan {
#[prost(map = "uint64, uint64", tag = "2")]
pub worker_slot_migration_plan: ::std::collections::HashMap<u64, u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FlushRequest {
#[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 FlushResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(uint64, tag = "2")]
pub hummock_version_id: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PauseRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PauseResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ResumeRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ResumeResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelCreatingJobsRequest {
#[prost(oneof = "cancel_creating_jobs_request::Jobs", tags = "1, 2")]
pub jobs: ::core::option::Option<cancel_creating_jobs_request::Jobs>,
}
pub mod cancel_creating_jobs_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatingJobInfo {
#[prost(uint32, tag = "1")]
pub database_id: u32,
#[prost(uint32, tag = "2")]
pub schema_id: u32,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatingJobInfos {
#[prost(message, repeated, tag = "1")]
pub infos: ::prost::alloc::vec::Vec<CreatingJobInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatingJobIds {
#[prost(uint32, repeated, tag = "1")]
pub job_ids: ::prost::alloc::vec::Vec<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Jobs {
#[prost(message, tag = "1")]
Infos(CreatingJobInfos),
#[prost(message, tag = "2")]
Ids(CreatingJobIds),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelCreatingJobsResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(uint32, repeated, tag = "2")]
pub canceled_jobs: ::prost::alloc::vec::Vec<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTableFragmentsRequest {
#[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 ListTableFragmentsResponse {
#[prost(map = "uint32, message", tag = "1")]
pub table_fragments: ::std::collections::HashMap<
u32,
list_table_fragments_response::TableFragmentInfo,
>,
}
pub mod list_table_fragments_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActorInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(message, optional, tag = "2")]
pub node: ::core::option::Option<super::super::stream_plan::StreamNode>,
#[prost(message, repeated, tag = "3")]
pub dispatcher: ::prost::alloc::vec::Vec<super::super::stream_plan::Dispatcher>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentInfo {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(message, repeated, tag = "4")]
pub actors: ::prost::alloc::vec::Vec<ActorInfo>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableFragmentInfo {
#[prost(message, repeated, tag = "1")]
pub fragments: ::prost::alloc::vec::Vec<FragmentInfo>,
#[prost(message, optional, tag = "2")]
pub ctx: ::core::option::Option<super::super::stream_plan::StreamContext>,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListTableFragmentStatesRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTableFragmentStatesResponse {
#[prost(message, repeated, tag = "1")]
pub states: ::prost::alloc::vec::Vec<
list_table_fragment_states_response::TableFragmentState,
>,
}
pub mod list_table_fragment_states_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TableFragmentState {
#[prost(uint32, tag = "1")]
pub table_id: u32,
#[prost(enumeration = "super::table_fragments::State", tag = "2")]
pub state: i32,
#[prost(message, optional, tag = "3")]
pub parallelism: ::core::option::Option<super::TableParallelism>,
#[prost(uint32, tag = "4")]
pub max_parallelism: u32,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListFragmentDistributionRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFragmentDistributionResponse {
#[prost(message, repeated, tag = "1")]
pub distributions: ::prost::alloc::vec::Vec<
list_fragment_distribution_response::FragmentDistribution,
>,
}
pub mod list_fragment_distribution_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentDistribution {
#[prost(uint32, tag = "1")]
pub fragment_id: u32,
#[prost(uint32, tag = "2")]
pub table_id: u32,
#[prost(
enumeration = "super::table_fragments::fragment::FragmentDistributionType",
tag = "3"
)]
pub distribution_type: i32,
#[prost(uint32, repeated, tag = "4")]
pub state_table_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, repeated, tag = "5")]
pub upstream_fragment_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "6")]
pub fragment_type_mask: u32,
#[prost(uint32, tag = "7")]
pub parallelism: u32,
#[prost(uint32, tag = "8")]
pub vnode_count: u32,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListActorStatesRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActorStatesResponse {
#[prost(message, repeated, tag = "1")]
pub states: ::prost::alloc::vec::Vec<list_actor_states_response::ActorState>,
}
pub mod list_actor_states_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ActorState {
#[prost(uint32, tag = "1")]
pub actor_id: u32,
#[prost(uint32, tag = "2")]
pub fragment_id: u32,
#[prost(
enumeration = "super::table_fragments::actor_status::ActorState",
tag = "4"
)]
pub state: i32,
#[prost(uint32, tag = "5")]
pub worker_id: u32,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListActorSplitsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActorSplitsResponse {
#[prost(message, repeated, tag = "1")]
pub actor_splits: ::prost::alloc::vec::Vec<list_actor_splits_response::ActorSplit>,
}
pub mod list_actor_splits_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActorSplit {
#[prost(uint32, tag = "1")]
pub actor_id: u32,
#[prost(uint32, tag = "2")]
pub fragment_id: u32,
#[prost(uint32, tag = "3")]
pub source_id: u32,
#[prost(string, tag = "4")]
pub split_id: ::prost::alloc::string::String,
#[prost(enumeration = "FragmentType", tag = "5")]
pub fragment_type: i32,
}
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FragmentType {
Unspecified = 0,
NonSharedSource = 1,
SharedSource = 2,
SharedSourceBackfill = 3,
}
impl FragmentType {
pub fn as_str_name(&self) -> &'static str {
match self {
FragmentType::Unspecified => "UNSPECIFIED",
FragmentType::NonSharedSource => "NON_SHARED_SOURCE",
FragmentType::SharedSource => "SHARED_SOURCE",
FragmentType::SharedSourceBackfill => "SHARED_SOURCE_BACKFILL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"NON_SHARED_SOURCE" => Some(Self::NonSharedSource),
"SHARED_SOURCE" => Some(Self::SharedSource),
"SHARED_SOURCE_BACKFILL" => Some(Self::SharedSourceBackfill),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListObjectDependenciesRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListObjectDependenciesResponse {
#[prost(message, repeated, tag = "1")]
pub dependencies: ::prost::alloc::vec::Vec<
list_object_dependencies_response::ObjectDependencies,
>,
}
pub mod list_object_dependencies_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ObjectDependencies {
#[prost(uint32, tag = "1")]
pub object_id: u32,
#[prost(uint32, tag = "2")]
pub referenced_object_id: u32,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ApplyThrottleRequest {
#[prost(enumeration = "ThrottleTarget", tag = "1")]
pub kind: i32,
#[prost(uint32, tag = "2")]
pub id: u32,
#[prost(uint32, optional, tag = "3")]
pub rate: ::core::option::Option<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyThrottleResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RecoverRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RecoverResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddWorkerNodeRequest {
#[prost(enumeration = "super::common::WorkerType", tag = "1")]
pub worker_type: i32,
#[prost(message, optional, tag = "2")]
pub host: ::core::option::Option<super::common::HostAddress>,
#[prost(message, optional, tag = "4")]
pub property: ::core::option::Option<add_worker_node_request::Property>,
#[prost(message, optional, tag = "5")]
pub resource: ::core::option::Option<super::common::worker_node::Resource>,
}
pub mod add_worker_node_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Property {
#[prost(uint64, tag = "1")]
pub worker_node_parallelism: u64,
#[prost(bool, tag = "2")]
pub is_streaming: bool,
#[prost(bool, tag = "3")]
pub is_serving: bool,
#[prost(bool, tag = "4")]
pub is_unschedulable: bool,
#[prost(string, tag = "5")]
pub internal_rpc_host_addr: ::prost::alloc::string::String,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddWorkerNodeResponse {
#[prost(uint32, optional, tag = "2")]
pub node_id: ::core::option::Option<u32>,
#[prost(string, tag = "4")]
pub cluster_id: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateWorkerNodeRequest {
#[prost(message, optional, tag = "1")]
pub host: ::core::option::Option<super::common::HostAddress>,
#[prost(uint32, tag = "2")]
pub node_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateWorkerNodeResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteWorkerNodeRequest {
#[prost(message, optional, tag = "1")]
pub host: ::core::option::Option<super::common::HostAddress>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteWorkerNodeResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateWorkerNodeSchedulabilityRequest {
#[prost(uint32, repeated, tag = "1")]
pub worker_ids: ::prost::alloc::vec::Vec<u32>,
#[prost(
enumeration = "update_worker_node_schedulability_request::Schedulability",
tag = "2"
)]
pub schedulability: i32,
}
pub mod update_worker_node_schedulability_request {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Schedulability {
Unspecified = 0,
Schedulable = 1,
Unschedulable = 2,
}
impl Schedulability {
pub fn as_str_name(&self) -> &'static str {
match self {
Schedulability::Unspecified => "UNSPECIFIED",
Schedulability::Schedulable => "SCHEDULABLE",
Schedulability::Unschedulable => "UNSCHEDULABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"SCHEDULABLE" => Some(Self::Schedulable),
"UNSCHEDULABLE" => Some(Self::Unschedulable),
_ => None,
}
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateWorkerNodeSchedulabilityResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListAllNodesRequest {
#[prost(enumeration = "super::common::WorkerType", optional, tag = "1")]
pub worker_type: ::core::option::Option<i32>,
#[prost(bool, tag = "2")]
pub include_starting_nodes: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAllNodesResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(message, repeated, tag = "2")]
pub nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetClusterRecoveryStatusRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetClusterRecoveryStatusResponse {
#[prost(enumeration = "RecoveryStatus", tag = "1")]
pub status: i32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeRequest {
#[prost(enumeration = "SubscribeType", tag = "1")]
pub subscribe_type: i32,
#[prost(message, optional, tag = "2")]
pub host: ::core::option::Option<super::common::HostAddress>,
#[prost(uint32, tag = "3")]
pub worker_id: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaSnapshot {
#[prost(message, repeated, tag = "1")]
pub databases: ::prost::alloc::vec::Vec<super::catalog::Database>,
#[prost(message, repeated, tag = "2")]
pub schemas: ::prost::alloc::vec::Vec<super::catalog::Schema>,
#[prost(message, repeated, tag = "3")]
pub sources: ::prost::alloc::vec::Vec<super::catalog::Source>,
#[prost(message, repeated, tag = "4")]
pub sinks: ::prost::alloc::vec::Vec<super::catalog::Sink>,
#[prost(message, repeated, tag = "5")]
pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
#[prost(message, repeated, tag = "6")]
pub indexes: ::prost::alloc::vec::Vec<super::catalog::Index>,
#[prost(message, repeated, tag = "7")]
pub views: ::prost::alloc::vec::Vec<super::catalog::View>,
#[prost(message, repeated, tag = "15")]
pub functions: ::prost::alloc::vec::Vec<super::catalog::Function>,
#[prost(message, repeated, tag = "17")]
pub connections: ::prost::alloc::vec::Vec<super::catalog::Connection>,
#[prost(message, repeated, tag = "19")]
pub subscriptions: ::prost::alloc::vec::Vec<super::catalog::Subscription>,
#[prost(message, repeated, tag = "8")]
pub users: ::prost::alloc::vec::Vec<super::user::UserInfo>,
#[prost(message, optional, tag = "20")]
pub session_params: ::core::option::Option<GetSessionParamsResponse>,
#[prost(message, repeated, tag = "23")]
pub secrets: ::prost::alloc::vec::Vec<super::catalog::Secret>,
#[prost(message, repeated, tag = "10")]
pub nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
#[prost(message, optional, tag = "12")]
pub hummock_version: ::core::option::Option<super::hummock::HummockVersion>,
#[prost(message, optional, tag = "14")]
pub meta_backup_manifest_id: ::core::option::Option<
super::backup_service::MetaBackupManifestId,
>,
#[prost(message, optional, tag = "16")]
pub hummock_write_limits: ::core::option::Option<super::hummock::WriteLimits>,
#[prost(message, repeated, tag = "21")]
pub streaming_worker_slot_mappings: ::prost::alloc::vec::Vec<
FragmentWorkerSlotMapping,
>,
#[prost(message, repeated, tag = "22")]
pub serving_worker_slot_mappings: ::prost::alloc::vec::Vec<
FragmentWorkerSlotMapping,
>,
#[prost(message, optional, tag = "13")]
pub version: ::core::option::Option<meta_snapshot::SnapshotVersion>,
}
pub mod meta_snapshot {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SnapshotVersion {
#[prost(uint64, tag = "1")]
pub catalog_version: u64,
#[prost(uint64, tag = "3")]
pub worker_node_version: u64,
#[prost(uint64, tag = "4")]
pub streaming_worker_slot_mapping_version: u64,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Relation {
#[prost(oneof = "relation::RelationInfo", tags = "1, 2, 3, 4, 5, 6")]
pub relation_info: ::core::option::Option<relation::RelationInfo>,
}
pub mod relation {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RelationInfo {
#[prost(message, tag = "1")]
Table(super::super::catalog::Table),
#[prost(message, tag = "2")]
Source(super::super::catalog::Source),
#[prost(message, tag = "3")]
Sink(super::super::catalog::Sink),
#[prost(message, tag = "4")]
Index(super::super::catalog::Index),
#[prost(message, tag = "5")]
View(super::super::catalog::View),
#[prost(message, tag = "6")]
Subscription(super::super::catalog::Subscription),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationGroup {
#[prost(message, repeated, tag = "1")]
pub relations: ::prost::alloc::vec::Vec<Relation>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Recovery {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeResponse {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::common::Status>,
#[prost(enumeration = "subscribe_response::Operation", tag = "2")]
pub operation: i32,
#[prost(uint64, tag = "3")]
pub version: u64,
#[prost(
oneof = "subscribe_response::Info",
tags = "4, 5, 6, 11, 26, 13, 15, 16, 17, 19, 20, 21, 22, 24, 25, 27, 28, 29"
)]
pub info: ::core::option::Option<subscribe_response::Info>,
}
pub mod subscribe_response {
#[derive(prost_helpers::AnyPB)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Operation {
Unspecified = 0,
Add = 1,
Delete = 2,
Update = 3,
Snapshot = 4,
}
impl Operation {
pub fn as_str_name(&self) -> &'static str {
match self {
Operation::Unspecified => "UNSPECIFIED",
Operation::Add => "ADD",
Operation::Delete => "DELETE",
Operation::Update => "UPDATE",
Operation::Snapshot => "SNAPSHOT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"ADD" => Some(Self::Add),
"DELETE" => Some(Self::Delete),
"UPDATE" => Some(Self::Update),
"SNAPSHOT" => Some(Self::Snapshot),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Info {
#[prost(message, tag = "4")]
Database(super::super::catalog::Database),
#[prost(message, tag = "5")]
Schema(super::super::catalog::Schema),
#[prost(message, tag = "6")]
Function(super::super::catalog::Function),
#[prost(message, tag = "11")]
User(super::super::user::UserInfo),
#[prost(message, tag = "26")]
SessionParam(super::SetSessionParamRequest),
#[prost(message, tag = "13")]
Node(super::super::common::WorkerNode),
#[prost(message, tag = "15")]
HummockVersionDeltas(super::super::hummock::HummockVersionDeltas),
#[prost(message, tag = "16")]
Snapshot(super::MetaSnapshot),
#[prost(message, tag = "17")]
MetaBackupManifestId(super::super::backup_service::MetaBackupManifestId),
#[prost(message, tag = "19")]
SystemParams(super::SystemParams),
#[prost(message, tag = "20")]
HummockWriteLimits(super::super::hummock::WriteLimits),
#[prost(message, tag = "21")]
RelationGroup(super::RelationGroup),
#[prost(message, tag = "22")]
Connection(super::super::catalog::Connection),
#[prost(message, tag = "24")]
HummockStats(super::super::hummock::HummockVersionStats),
#[prost(message, tag = "25")]
Recovery(super::Recovery),
#[prost(message, tag = "27")]
StreamingWorkerSlotMapping(super::FragmentWorkerSlotMapping),
#[prost(message, tag = "28")]
ServingWorkerSlotMappings(super::FragmentWorkerSlotMappings),
#[prost(message, tag = "29")]
Secret(super::super::catalog::Secret),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetClusterInfoRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterInfoResponse {
#[prost(message, repeated, tag = "1")]
pub worker_nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
#[prost(message, repeated, tag = "2")]
pub table_fragments: ::prost::alloc::vec::Vec<TableFragments>,
#[prost(map = "uint32, message", tag = "3")]
pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
#[prost(map = "uint32, message", tag = "4")]
pub source_infos: ::std::collections::HashMap<u32, super::catalog::Source>,
#[prost(uint64, tag = "5")]
pub revision: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerReschedule {
#[prost(map = "uint32, int32", tag = "1")]
pub worker_actor_diff: ::std::collections::HashMap<u32, i32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescheduleRequest {
#[prost(uint64, tag = "2")]
pub revision: u64,
#[prost(bool, tag = "3")]
pub resolve_no_shuffle_upstream: bool,
#[prost(map = "uint32, message", tag = "4")]
pub worker_reschedules: ::std::collections::HashMap<u32, WorkerReschedule>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RescheduleResponse {
#[prost(bool, tag = "1")]
pub success: bool,
#[prost(uint64, tag = "2")]
pub revision: u64,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TableParallelism {
#[prost(oneof = "table_parallelism::Parallelism", tags = "1, 2, 3, 4")]
pub parallelism: ::core::option::Option<table_parallelism::Parallelism>,
}
pub mod table_parallelism {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FixedParallelism {
#[prost(uint32, tag = "1")]
pub parallelism: u32,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AutoParallelism {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AdaptiveParallelism {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CustomParallelism {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Parallelism {
#[prost(message, tag = "1")]
Fixed(FixedParallelism),
#[prost(message, tag = "2")]
Auto(AutoParallelism),
#[prost(message, tag = "3")]
Custom(CustomParallelism),
#[prost(message, tag = "4")]
Adaptive(AdaptiveParallelism),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamingJobNodeLabelsRequest {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(string, tag = "2")]
pub node_label: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateStreamingJobNodeLabelsResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetServerlessStreamingJobsStatusRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServerlessStreamingJobsStatusResponse {
#[prost(message, repeated, tag = "1")]
pub streaming_job_statuses: ::prost::alloc::vec::Vec<
get_serverless_streaming_jobs_status_response::Status,
>,
}
pub mod get_serverless_streaming_jobs_status_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Status {
#[prost(uint32, tag = "1")]
pub table_id: u32,
#[prost(string, tag = "2")]
pub node_label: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub backfill_done: bool,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MembersRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaMember {
#[prost(message, optional, tag = "1")]
pub address: ::core::option::Option<super::common::HostAddress>,
#[prost(bool, tag = "2")]
pub is_leader: bool,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembersResponse {
#[prost(message, repeated, tag = "1")]
pub members: ::prost::alloc::vec::Vec<MetaMember>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[prost(skip_debug)]
pub struct SystemParams {
#[prost(uint32, optional, tag = "1")]
pub barrier_interval_ms: ::core::option::Option<u32>,
#[prost(uint64, optional, tag = "2")]
pub checkpoint_frequency: ::core::option::Option<u64>,
#[prost(uint32, optional, tag = "3")]
pub sstable_size_mb: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "4")]
pub block_size_kb: ::core::option::Option<u32>,
#[prost(double, optional, tag = "5")]
pub bloom_false_positive: ::core::option::Option<f64>,
#[prost(string, optional, tag = "6")]
pub state_store: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub data_directory: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub backup_storage_url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub backup_storage_directory: ::core::option::Option<::prost::alloc::string::String>,
#[deprecated]
#[prost(bool, optional, tag = "10")]
pub telemetry_enabled: ::core::option::Option<bool>,
#[prost(uint32, optional, tag = "11")]
pub parallel_compact_size_mb: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "12")]
pub max_concurrent_creating_streaming_jobs: ::core::option::Option<u32>,
#[prost(bool, optional, tag = "13")]
pub pause_on_next_bootstrap: ::core::option::Option<bool>,
#[deprecated]
#[prost(string, optional, tag = "14")]
pub wasm_storage_url: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "15")]
pub enable_tracing: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "16")]
pub use_new_object_prefix_strategy: ::core::option::Option<bool>,
#[prost(string, optional, tag = "17")]
pub license_key: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "18")]
pub time_travel_retention_ms: ::core::option::Option<u64>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetSystemParamsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSystemParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<SystemParams>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetSystemParamRequest {
#[prost(string, tag = "1")]
pub param: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetSystemParamResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<SystemParams>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetSessionParamsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionParamsResponse {
#[prost(string, tag = "1")]
pub params: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetSessionParamRequest {
#[prost(string, tag = "1")]
pub param: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetSessionParamResponse {
#[prost(string, tag = "1")]
pub param: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetServingVnodeMappingsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetServingVnodeMappingsResponse {
#[prost(map = "uint32, uint32", tag = "2")]
pub fragment_to_table: ::std::collections::HashMap<u32, u32>,
#[prost(message, repeated, tag = "3")]
pub worker_slot_mappings: ::prost::alloc::vec::Vec<FragmentWorkerSlotMapping>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventLog {
#[prost(string, optional, tag = "1")]
pub unique_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint64, optional, tag = "2")]
pub timestamp: ::core::option::Option<u64>,
#[prost(oneof = "event_log::Event", tags = "3, 4, 5, 6, 7, 8, 9, 10, 11")]
pub event: ::core::option::Option<event_log::Event>,
}
pub mod event_log {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventMetaNodeStart {
#[prost(string, tag = "1")]
pub advertise_addr: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub listen_addr: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub opts: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventCreateStreamJobFail {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub definition: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub error: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventDirtyStreamJobClear {
#[prost(uint32, tag = "1")]
pub id: u32,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub definition: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub error: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventBarrierComplete {
#[prost(uint64, tag = "1")]
pub prev_epoch: u64,
#[prost(uint64, tag = "2")]
pub cur_epoch: u64,
#[prost(double, tag = "3")]
pub duration_sec: f64,
#[prost(string, tag = "4")]
pub command: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub barrier_kind: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventInjectBarrierFail {
#[prost(uint64, tag = "1")]
pub prev_epoch: u64,
#[prost(uint64, tag = "2")]
pub cur_epoch: u64,
#[prost(string, tag = "3")]
pub error: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventCollectBarrierFail {
#[prost(string, tag = "3")]
pub error: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventWorkerNodePanic {
#[prost(uint32, tag = "1")]
pub worker_id: u32,
#[prost(enumeration = "super::super::common::WorkerType", tag = "2")]
pub worker_type: i32,
#[prost(message, optional, tag = "3")]
pub host_addr: ::core::option::Option<super::super::common::HostAddress>,
#[prost(string, tag = "4")]
pub panic_info: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventAutoSchemaChangeFail {
#[prost(uint32, tag = "1")]
pub table_id: u32,
#[prost(string, tag = "2")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cdc_table_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub upstream_ddl: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EventSinkFail {
#[prost(uint32, tag = "1")]
pub sink_id: u32,
#[prost(string, tag = "2")]
pub sink_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub connector: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub error: ::prost::alloc::string::String,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "3")]
CreateStreamJobFail(EventCreateStreamJobFail),
#[prost(message, tag = "4")]
DirtyStreamJobClear(EventDirtyStreamJobClear),
#[prost(message, tag = "5")]
MetaNodeStart(EventMetaNodeStart),
#[prost(message, tag = "6")]
BarrierComplete(EventBarrierComplete),
#[prost(message, tag = "7")]
InjectBarrierFail(EventInjectBarrierFail),
#[prost(message, tag = "8")]
CollectBarrierFail(EventCollectBarrierFail),
#[prost(message, tag = "9")]
WorkerNodePanic(EventWorkerNodePanic),
#[prost(message, tag = "10")]
AutoSchemaChangeFail(EventAutoSchemaChangeFail),
#[prost(message, tag = "11")]
SinkFail(EventSinkFail),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListEventLogRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEventLogResponse {
#[prost(message, repeated, tag = "1")]
pub event_logs: ::prost::alloc::vec::Vec<EventLog>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddEventLogRequest {
#[prost(oneof = "add_event_log_request::Event", tags = "1, 2")]
pub event: ::core::option::Option<add_event_log_request::Event>,
}
pub mod add_event_log_request {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "1")]
WorkerNodePanic(super::event_log::EventWorkerNodePanic),
#[prost(message, tag = "2")]
SinkFail(super::event_log::EventSinkFail),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AddEventLogResponse {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActorIds {
#[prost(uint32, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentIdToActorIdMap {
#[prost(map = "uint32, message", tag = "1")]
pub map: ::std::collections::HashMap<u32, ActorIds>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationIdInfos {
#[prost(map = "uint32, message", tag = "1")]
pub map: ::std::collections::HashMap<u32, FragmentIdToActorIdMap>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentVertexToRelationMap {
#[prost(map = "uint32, uint32", tag = "1")]
pub in_map: ::std::collections::HashMap<u32, u32>,
#[prost(map = "uint32, uint32", tag = "2")]
pub out_map: ::std::collections::HashMap<u32, u32>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActorCountPerParallelism {
#[prost(map = "uint32, message", tag = "1")]
pub worker_id_to_actor_count: ::std::collections::HashMap<
u32,
actor_count_per_parallelism::WorkerActorCount,
>,
#[prost(uint64, tag = "2")]
pub hard_limit: u64,
#[prost(uint64, tag = "3")]
pub soft_limit: u64,
}
pub mod actor_count_per_parallelism {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WorkerActorCount {
#[prost(uint64, tag = "1")]
pub actor_count: u64,
#[prost(uint64, tag = "2")]
pub parallelism: u64,
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterLimit {
#[prost(oneof = "cluster_limit::Limit", tags = "1")]
pub limit: ::core::option::Option<cluster_limit::Limit>,
}
pub mod cluster_limit {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Limit {
#[prost(message, tag = "1")]
ActorCount(super::ActorCountPerParallelism),
}
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetClusterLimitsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterLimitsResponse {
#[prost(message, repeated, tag = "1")]
pub active_limits: ::prost::alloc::vec::Vec<ClusterLimit>,
}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListRateLimitsRequest {}
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRateLimitsResponse {
#[prost(message, repeated, tag = "1")]
pub rate_limits: ::prost::alloc::vec::Vec<list_rate_limits_response::RateLimitInfo>,
}
pub mod list_rate_limits_response {
#[derive(prost_helpers::AnyPB)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RateLimitInfo {
#[prost(uint32, tag = "1")]
pub fragment_id: u32,
#[prost(uint32, tag = "2")]
pub job_id: u32,
#[prost(uint32, tag = "3")]
pub fragment_type_mask: u32,
#[prost(uint32, tag = "4")]
pub rate_limit: u32,
#[prost(string, tag = "5")]
pub node_name: ::prost::alloc::string::String,
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(::enum_as_inner::EnumAsInner)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PausedReason {
Unspecified = 0,
ConfigChange = 1,
Manual = 2,
}
impl PausedReason {
pub fn as_str_name(&self) -> &'static str {
match self {
PausedReason::Unspecified => "PAUSED_REASON_UNSPECIFIED",
PausedReason::ConfigChange => "PAUSED_REASON_CONFIG_CHANGE",
PausedReason::Manual => "PAUSED_REASON_MANUAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PAUSED_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"PAUSED_REASON_CONFIG_CHANGE" => Some(Self::ConfigChange),
"PAUSED_REASON_MANUAL" => Some(Self::Manual),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ThrottleTarget {
Unspecified = 0,
Source = 1,
Mv = 2,
TableWithSource = 3,
CdcTable = 4,
}
impl ThrottleTarget {
pub fn as_str_name(&self) -> &'static str {
match self {
ThrottleTarget::Unspecified => "THROTTLE_TARGET_UNSPECIFIED",
ThrottleTarget::Source => "SOURCE",
ThrottleTarget::Mv => "MV",
ThrottleTarget::TableWithSource => "TABLE_WITH_SOURCE",
ThrottleTarget::CdcTable => "CDC_TABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"THROTTLE_TARGET_UNSPECIFIED" => Some(Self::Unspecified),
"SOURCE" => Some(Self::Source),
"MV" => Some(Self::Mv),
"TABLE_WITH_SOURCE" => Some(Self::TableWithSource),
"CDC_TABLE" => Some(Self::CdcTable),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RecoveryStatus {
StatusUnspecified = 0,
StatusStarting = 1,
StatusRecovering = 2,
StatusRunning = 3,
}
impl RecoveryStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
RecoveryStatus::StatusUnspecified => "STATUS_UNSPECIFIED",
RecoveryStatus::StatusStarting => "STATUS_STARTING",
RecoveryStatus::StatusRecovering => "STATUS_RECOVERING",
RecoveryStatus::StatusRunning => "STATUS_RUNNING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::StatusUnspecified),
"STATUS_STARTING" => Some(Self::StatusStarting),
"STATUS_RECOVERING" => Some(Self::StatusRecovering),
"STATUS_RUNNING" => Some(Self::StatusRunning),
_ => None,
}
}
}
#[derive(prost_helpers::AnyPB)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SubscribeType {
Unspecified = 0,
Frontend = 1,
Hummock = 2,
Compactor = 3,
Compute = 4,
}
impl SubscribeType {
pub fn as_str_name(&self) -> &'static str {
match self {
SubscribeType::Unspecified => "UNSPECIFIED",
SubscribeType::Frontend => "FRONTEND",
SubscribeType::Hummock => "HUMMOCK",
SubscribeType::Compactor => "COMPACTOR",
SubscribeType::Compute => "COMPUTE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNSPECIFIED" => Some(Self::Unspecified),
"FRONTEND" => Some(Self::Frontend),
"HUMMOCK" => Some(Self::Hummock),
"COMPACTOR" => Some(Self::Compactor),
"COMPUTE" => Some(Self::Compute),
_ => None,
}
}
}
pub mod telemetry_info_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 TelemetryInfoServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl TelemetryInfoServiceClient<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> TelemetryInfoServiceClient<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,
) -> TelemetryInfoServiceClient<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,
{
TelemetryInfoServiceClient::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 get_telemetry_info(
&mut self,
request: impl tonic::IntoRequest<super::GetTelemetryInfoRequest>,
) -> std::result::Result<
tonic::Response<super::TelemetryInfoResponse>,
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(
"/meta.TelemetryInfoService/GetTelemetryInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("meta.TelemetryInfoService", "GetTelemetryInfo"),
);
self.inner.unary(req, path, codec).await
}
}
}
pub mod heartbeat_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 HeartbeatServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl HeartbeatServiceClient<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> HeartbeatServiceClient<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,
) -> HeartbeatServiceClient<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,
{
HeartbeatServiceClient::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 heartbeat(
&mut self,
request: impl tonic::IntoRequest<super::HeartbeatRequest>,
) -> std::result::Result<
tonic::Response<super::HeartbeatResponse>,
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(
"/meta.HeartbeatService/Heartbeat",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.HeartbeatService", "Heartbeat"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod stream_manager_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 StreamManagerServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl StreamManagerServiceClient<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> StreamManagerServiceClient<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,
) -> StreamManagerServiceClient<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,
{
StreamManagerServiceClient::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 flush(
&mut self,
request: impl tonic::IntoRequest<super::FlushRequest>,
) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/meta.StreamManagerService/Flush",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "Flush"));
self.inner.unary(req, path, codec).await
}
pub async fn pause(
&mut self,
request: impl tonic::IntoRequest<super::PauseRequest>,
) -> std::result::Result<tonic::Response<super::PauseResponse>, 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(
"/meta.StreamManagerService/Pause",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "Pause"));
self.inner.unary(req, path, codec).await
}
pub async fn resume(
&mut self,
request: impl tonic::IntoRequest<super::ResumeRequest>,
) -> std::result::Result<tonic::Response<super::ResumeResponse>, 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(
"/meta.StreamManagerService/Resume",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "Resume"));
self.inner.unary(req, path, codec).await
}
pub async fn cancel_creating_jobs(
&mut self,
request: impl tonic::IntoRequest<super::CancelCreatingJobsRequest>,
) -> std::result::Result<
tonic::Response<super::CancelCreatingJobsResponse>,
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(
"/meta.StreamManagerService/CancelCreatingJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("meta.StreamManagerService", "CancelCreatingJobs"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_table_fragments(
&mut self,
request: impl tonic::IntoRequest<super::ListTableFragmentsRequest>,
) -> std::result::Result<
tonic::Response<super::ListTableFragmentsResponse>,
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(
"/meta.StreamManagerService/ListTableFragments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("meta.StreamManagerService", "ListTableFragments"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_table_fragment_states(
&mut self,
request: impl tonic::IntoRequest<super::ListTableFragmentStatesRequest>,
) -> std::result::Result<
tonic::Response<super::ListTableFragmentStatesResponse>,
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(
"/meta.StreamManagerService/ListTableFragmentStates",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"meta.StreamManagerService",
"ListTableFragmentStates",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_fragment_distribution(
&mut self,
request: impl tonic::IntoRequest<super::ListFragmentDistributionRequest>,
) -> std::result::Result<
tonic::Response<super::ListFragmentDistributionResponse>,
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(
"/meta.StreamManagerService/ListFragmentDistribution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"meta.StreamManagerService",
"ListFragmentDistribution",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_actor_states(
&mut self,
request: impl tonic::IntoRequest<super::ListActorStatesRequest>,
) -> std::result::Result<
tonic::Response<super::ListActorStatesResponse>,
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(
"/meta.StreamManagerService/ListActorStates",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "ListActorStates"));
self.inner.unary(req, path, codec).await
}
pub async fn list_actor_splits(
&mut self,
request: impl tonic::IntoRequest<super::ListActorSplitsRequest>,
) -> std::result::Result<
tonic::Response<super::ListActorSplitsResponse>,
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(
"/meta.StreamManagerService/ListActorSplits",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "ListActorSplits"));
self.inner.unary(req, path, codec).await
}
pub async fn list_object_dependencies(
&mut self,
request: impl tonic::IntoRequest<super::ListObjectDependenciesRequest>,
) -> std::result::Result<
tonic::Response<super::ListObjectDependenciesResponse>,
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(
"/meta.StreamManagerService/ListObjectDependencies",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"meta.StreamManagerService",
"ListObjectDependencies",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn apply_throttle(
&mut self,
request: impl tonic::IntoRequest<super::ApplyThrottleRequest>,
) -> std::result::Result<
tonic::Response<super::ApplyThrottleResponse>,
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(
"/meta.StreamManagerService/ApplyThrottle",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "ApplyThrottle"));
self.inner.unary(req, path, codec).await
}
pub async fn recover(
&mut self,
request: impl tonic::IntoRequest<super::RecoverRequest>,
) -> std::result::Result<
tonic::Response<super::RecoverResponse>,
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(
"/meta.StreamManagerService/Recover",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "Recover"));
self.inner.unary(req, path, codec).await
}
pub async fn list_rate_limits(
&mut self,
request: impl tonic::IntoRequest<super::ListRateLimitsRequest>,
) -> std::result::Result<
tonic::Response<super::ListRateLimitsResponse>,
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(
"/meta.StreamManagerService/ListRateLimits",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.StreamManagerService", "ListRateLimits"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod cluster_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 ClusterServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ClusterServiceClient<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> ClusterServiceClient<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,
) -> ClusterServiceClient<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,
{
ClusterServiceClient::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 add_worker_node(
&mut self,
request: impl tonic::IntoRequest<super::AddWorkerNodeRequest>,
) -> std::result::Result<
tonic::Response<super::AddWorkerNodeResponse>,
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(
"/meta.ClusterService/AddWorkerNode",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ClusterService", "AddWorkerNode"));
self.inner.unary(req, path, codec).await
}
pub async fn activate_worker_node(
&mut self,
request: impl tonic::IntoRequest<super::ActivateWorkerNodeRequest>,
) -> std::result::Result<
tonic::Response<super::ActivateWorkerNodeResponse>,
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(
"/meta.ClusterService/ActivateWorkerNode",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ClusterService", "ActivateWorkerNode"));
self.inner.unary(req, path, codec).await
}
pub async fn delete_worker_node(
&mut self,
request: impl tonic::IntoRequest<super::DeleteWorkerNodeRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteWorkerNodeResponse>,
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(
"/meta.ClusterService/DeleteWorkerNode",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ClusterService", "DeleteWorkerNode"));
self.inner.unary(req, path, codec).await
}
pub async fn update_worker_node_schedulability(
&mut self,
request: impl tonic::IntoRequest<
super::UpdateWorkerNodeSchedulabilityRequest,
>,
) -> std::result::Result<
tonic::Response<super::UpdateWorkerNodeSchedulabilityResponse>,
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(
"/meta.ClusterService/UpdateWorkerNodeSchedulability",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"meta.ClusterService",
"UpdateWorkerNodeSchedulability",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_all_nodes(
&mut self,
request: impl tonic::IntoRequest<super::ListAllNodesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAllNodesResponse>,
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(
"/meta.ClusterService/ListAllNodes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ClusterService", "ListAllNodes"));
self.inner.unary(req, path, codec).await
}
pub async fn get_cluster_recovery_status(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterRecoveryStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetClusterRecoveryStatusResponse>,
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(
"/meta.ClusterService/GetClusterRecoveryStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("meta.ClusterService", "GetClusterRecoveryStatus"),
);
self.inner.unary(req, path, codec).await
}
}
}
pub mod notification_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 NotificationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl NotificationServiceClient<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> NotificationServiceClient<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,
) -> NotificationServiceClient<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,
{
NotificationServiceClient::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 subscribe(
&mut self,
request: impl tonic::IntoRequest<super::SubscribeRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::SubscribeResponse>>,
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(
"/meta.NotificationService/Subscribe",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.NotificationService", "Subscribe"));
self.inner.server_streaming(req, path, codec).await
}
}
}
pub mod scale_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 ScaleServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ScaleServiceClient<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> ScaleServiceClient<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,
) -> ScaleServiceClient<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,
{
ScaleServiceClient::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 get_cluster_info(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterInfoRequest>,
) -> std::result::Result<
tonic::Response<super::GetClusterInfoResponse>,
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(
"/meta.ScaleService/GetClusterInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ScaleService", "GetClusterInfo"));
self.inner.unary(req, path, codec).await
}
pub async fn reschedule(
&mut self,
request: impl tonic::IntoRequest<super::RescheduleRequest>,
) -> std::result::Result<
tonic::Response<super::RescheduleResponse>,
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(
"/meta.ScaleService/Reschedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ScaleService", "Reschedule"));
self.inner.unary(req, path, codec).await
}
pub async fn update_streaming_job_node_labels(
&mut self,
request: impl tonic::IntoRequest<super::UpdateStreamingJobNodeLabelsRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateStreamingJobNodeLabelsResponse>,
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(
"/meta.ScaleService/UpdateStreamingJobNodeLabels",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("meta.ScaleService", "UpdateStreamingJobNodeLabels"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_serverless_streaming_jobs_status(
&mut self,
request: impl tonic::IntoRequest<
super::GetServerlessStreamingJobsStatusRequest,
>,
) -> std::result::Result<
tonic::Response<super::GetServerlessStreamingJobsStatusResponse>,
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(
"/meta.ScaleService/GetServerlessStreamingJobsStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"meta.ScaleService",
"GetServerlessStreamingJobsStatus",
),
);
self.inner.unary(req, path, codec).await
}
}
}
pub mod meta_member_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 MetaMemberServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MetaMemberServiceClient<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> MetaMemberServiceClient<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,
) -> MetaMemberServiceClient<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,
{
MetaMemberServiceClient::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 members(
&mut self,
request: impl tonic::IntoRequest<super::MembersRequest>,
) -> std::result::Result<
tonic::Response<super::MembersResponse>,
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(
"/meta.MetaMemberService/Members",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.MetaMemberService", "Members"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod system_params_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 SystemParamsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SystemParamsServiceClient<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> SystemParamsServiceClient<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,
) -> SystemParamsServiceClient<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,
{
SystemParamsServiceClient::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 get_system_params(
&mut self,
request: impl tonic::IntoRequest<super::GetSystemParamsRequest>,
) -> std::result::Result<
tonic::Response<super::GetSystemParamsResponse>,
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(
"/meta.SystemParamsService/GetSystemParams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.SystemParamsService", "GetSystemParams"));
self.inner.unary(req, path, codec).await
}
pub async fn set_system_param(
&mut self,
request: impl tonic::IntoRequest<super::SetSystemParamRequest>,
) -> std::result::Result<
tonic::Response<super::SetSystemParamResponse>,
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(
"/meta.SystemParamsService/SetSystemParam",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.SystemParamsService", "SetSystemParam"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod session_param_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 SessionParamServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SessionParamServiceClient<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> SessionParamServiceClient<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,
) -> SessionParamServiceClient<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,
{
SessionParamServiceClient::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 get_session_params(
&mut self,
request: impl tonic::IntoRequest<super::GetSessionParamsRequest>,
) -> std::result::Result<
tonic::Response<super::GetSessionParamsResponse>,
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(
"/meta.SessionParamService/GetSessionParams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.SessionParamService", "GetSessionParams"));
self.inner.unary(req, path, codec).await
}
pub async fn set_session_param(
&mut self,
request: impl tonic::IntoRequest<super::SetSessionParamRequest>,
) -> std::result::Result<
tonic::Response<super::SetSessionParamResponse>,
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(
"/meta.SessionParamService/SetSessionParam",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.SessionParamService", "SetSessionParam"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod serving_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 ServingServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ServingServiceClient<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> ServingServiceClient<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,
) -> ServingServiceClient<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,
{
ServingServiceClient::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 get_serving_vnode_mappings(
&mut self,
request: impl tonic::IntoRequest<super::GetServingVnodeMappingsRequest>,
) -> std::result::Result<
tonic::Response<super::GetServingVnodeMappingsResponse>,
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(
"/meta.ServingService/GetServingVnodeMappings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("meta.ServingService", "GetServingVnodeMappings"),
);
self.inner.unary(req, path, codec).await
}
}
}
pub mod event_log_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 EventLogServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl EventLogServiceClient<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> EventLogServiceClient<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,
) -> EventLogServiceClient<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,
{
EventLogServiceClient::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 list_event_log(
&mut self,
request: impl tonic::IntoRequest<super::ListEventLogRequest>,
) -> std::result::Result<
tonic::Response<super::ListEventLogResponse>,
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(
"/meta.EventLogService/ListEventLog",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.EventLogService", "ListEventLog"));
self.inner.unary(req, path, codec).await
}
pub async fn add_event_log(
&mut self,
request: impl tonic::IntoRequest<super::AddEventLogRequest>,
) -> std::result::Result<
tonic::Response<super::AddEventLogResponse>,
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(
"/meta.EventLogService/AddEventLog",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.EventLogService", "AddEventLog"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod cluster_limit_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 ClusterLimitServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ClusterLimitServiceClient<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> ClusterLimitServiceClient<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,
) -> ClusterLimitServiceClient<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,
{
ClusterLimitServiceClient::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 get_cluster_limits(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterLimitsRequest>,
) -> std::result::Result<
tonic::Response<super::GetClusterLimitsResponse>,
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(
"/meta.ClusterLimitService/GetClusterLimits",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("meta.ClusterLimitService", "GetClusterLimits"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod telemetry_info_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait TelemetryInfoService: std::marker::Send + std::marker::Sync + 'static {
async fn get_telemetry_info(
&self,
request: tonic::Request<super::GetTelemetryInfoRequest>,
) -> std::result::Result<
tonic::Response<super::TelemetryInfoResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct TelemetryInfoServiceServer<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> TelemetryInfoServiceServer<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 TelemetryInfoServiceServer<T>
where
T: TelemetryInfoService,
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() {
"/meta.TelemetryInfoService/GetTelemetryInfo" => {
#[allow(non_camel_case_types)]
struct GetTelemetryInfoSvc<T: TelemetryInfoService>(pub Arc<T>);
impl<
T: TelemetryInfoService,
> tonic::server::UnaryService<super::GetTelemetryInfoRequest>
for GetTelemetryInfoSvc<T> {
type Response = super::TelemetryInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetTelemetryInfoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TelemetryInfoService>::get_telemetry_info(
&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 = GetTelemetryInfoSvc(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 TelemetryInfoServiceServer<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 = "meta.TelemetryInfoService";
impl<T> tonic::server::NamedService for TelemetryInfoServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod heartbeat_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait HeartbeatService: std::marker::Send + std::marker::Sync + 'static {
async fn heartbeat(
&self,
request: tonic::Request<super::HeartbeatRequest>,
) -> std::result::Result<
tonic::Response<super::HeartbeatResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct HeartbeatServiceServer<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> HeartbeatServiceServer<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 HeartbeatServiceServer<T>
where
T: HeartbeatService,
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() {
"/meta.HeartbeatService/Heartbeat" => {
#[allow(non_camel_case_types)]
struct HeartbeatSvc<T: HeartbeatService>(pub Arc<T>);
impl<
T: HeartbeatService,
> tonic::server::UnaryService<super::HeartbeatRequest>
for HeartbeatSvc<T> {
type Response = super::HeartbeatResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::HeartbeatRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as HeartbeatService>::heartbeat(&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 = HeartbeatSvc(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 HeartbeatServiceServer<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 = "meta.HeartbeatService";
impl<T> tonic::server::NamedService for HeartbeatServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod stream_manager_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait StreamManagerService: std::marker::Send + std::marker::Sync + 'static {
async fn flush(
&self,
request: tonic::Request<super::FlushRequest>,
) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status>;
async fn pause(
&self,
request: tonic::Request<super::PauseRequest>,
) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status>;
async fn resume(
&self,
request: tonic::Request<super::ResumeRequest>,
) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status>;
async fn cancel_creating_jobs(
&self,
request: tonic::Request<super::CancelCreatingJobsRequest>,
) -> std::result::Result<
tonic::Response<super::CancelCreatingJobsResponse>,
tonic::Status,
>;
async fn list_table_fragments(
&self,
request: tonic::Request<super::ListTableFragmentsRequest>,
) -> std::result::Result<
tonic::Response<super::ListTableFragmentsResponse>,
tonic::Status,
>;
async fn list_table_fragment_states(
&self,
request: tonic::Request<super::ListTableFragmentStatesRequest>,
) -> std::result::Result<
tonic::Response<super::ListTableFragmentStatesResponse>,
tonic::Status,
>;
async fn list_fragment_distribution(
&self,
request: tonic::Request<super::ListFragmentDistributionRequest>,
) -> std::result::Result<
tonic::Response<super::ListFragmentDistributionResponse>,
tonic::Status,
>;
async fn list_actor_states(
&self,
request: tonic::Request<super::ListActorStatesRequest>,
) -> std::result::Result<
tonic::Response<super::ListActorStatesResponse>,
tonic::Status,
>;
async fn list_actor_splits(
&self,
request: tonic::Request<super::ListActorSplitsRequest>,
) -> std::result::Result<
tonic::Response<super::ListActorSplitsResponse>,
tonic::Status,
>;
async fn list_object_dependencies(
&self,
request: tonic::Request<super::ListObjectDependenciesRequest>,
) -> std::result::Result<
tonic::Response<super::ListObjectDependenciesResponse>,
tonic::Status,
>;
async fn apply_throttle(
&self,
request: tonic::Request<super::ApplyThrottleRequest>,
) -> std::result::Result<
tonic::Response<super::ApplyThrottleResponse>,
tonic::Status,
>;
async fn recover(
&self,
request: tonic::Request<super::RecoverRequest>,
) -> std::result::Result<tonic::Response<super::RecoverResponse>, tonic::Status>;
async fn list_rate_limits(
&self,
request: tonic::Request<super::ListRateLimitsRequest>,
) -> std::result::Result<
tonic::Response<super::ListRateLimitsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct StreamManagerServiceServer<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> StreamManagerServiceServer<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 StreamManagerServiceServer<T>
where
T: StreamManagerService,
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() {
"/meta.StreamManagerService/Flush" => {
#[allow(non_camel_case_types)]
struct FlushSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::FlushRequest> for FlushSvc<T> {
type Response = super::FlushResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::FlushRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::flush(&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 = FlushSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.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)
}
"/meta.StreamManagerService/Pause" => {
#[allow(non_camel_case_types)]
struct PauseSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> {
type Response = super::PauseResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::PauseRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::pause(&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 = PauseSvc(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)
}
"/meta.StreamManagerService/Resume" => {
#[allow(non_camel_case_types)]
struct ResumeSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ResumeRequest>
for ResumeSvc<T> {
type Response = super::ResumeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ResumeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::resume(&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 = ResumeSvc(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)
}
"/meta.StreamManagerService/CancelCreatingJobs" => {
#[allow(non_camel_case_types)]
struct CancelCreatingJobsSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::CancelCreatingJobsRequest>
for CancelCreatingJobsSvc<T> {
type Response = super::CancelCreatingJobsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::CancelCreatingJobsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::cancel_creating_jobs(
&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 = CancelCreatingJobsSvc(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)
}
"/meta.StreamManagerService/ListTableFragments" => {
#[allow(non_camel_case_types)]
struct ListTableFragmentsSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListTableFragmentsRequest>
for ListTableFragmentsSvc<T> {
type Response = super::ListTableFragmentsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListTableFragmentsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_table_fragments(
&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 = ListTableFragmentsSvc(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)
}
"/meta.StreamManagerService/ListTableFragmentStates" => {
#[allow(non_camel_case_types)]
struct ListTableFragmentStatesSvc<T: StreamManagerService>(
pub Arc<T>,
);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListTableFragmentStatesRequest>
for ListTableFragmentStatesSvc<T> {
type Response = super::ListTableFragmentStatesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::ListTableFragmentStatesRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_table_fragment_states(
&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 = ListTableFragmentStatesSvc(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)
}
"/meta.StreamManagerService/ListFragmentDistribution" => {
#[allow(non_camel_case_types)]
struct ListFragmentDistributionSvc<T: StreamManagerService>(
pub Arc<T>,
);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListFragmentDistributionRequest>
for ListFragmentDistributionSvc<T> {
type Response = super::ListFragmentDistributionResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::ListFragmentDistributionRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_fragment_distribution(
&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 = ListFragmentDistributionSvc(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)
}
"/meta.StreamManagerService/ListActorStates" => {
#[allow(non_camel_case_types)]
struct ListActorStatesSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListActorStatesRequest>
for ListActorStatesSvc<T> {
type Response = super::ListActorStatesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListActorStatesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_actor_states(
&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 = ListActorStatesSvc(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)
}
"/meta.StreamManagerService/ListActorSplits" => {
#[allow(non_camel_case_types)]
struct ListActorSplitsSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListActorSplitsRequest>
for ListActorSplitsSvc<T> {
type Response = super::ListActorSplitsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListActorSplitsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_actor_splits(
&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 = ListActorSplitsSvc(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)
}
"/meta.StreamManagerService/ListObjectDependencies" => {
#[allow(non_camel_case_types)]
struct ListObjectDependenciesSvc<T: StreamManagerService>(
pub Arc<T>,
);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListObjectDependenciesRequest>
for ListObjectDependenciesSvc<T> {
type Response = super::ListObjectDependenciesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListObjectDependenciesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_object_dependencies(
&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 = ListObjectDependenciesSvc(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)
}
"/meta.StreamManagerService/ApplyThrottle" => {
#[allow(non_camel_case_types)]
struct ApplyThrottleSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ApplyThrottleRequest>
for ApplyThrottleSvc<T> {
type Response = super::ApplyThrottleResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ApplyThrottleRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::apply_throttle(&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 = ApplyThrottleSvc(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)
}
"/meta.StreamManagerService/Recover" => {
#[allow(non_camel_case_types)]
struct RecoverSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::RecoverRequest>
for RecoverSvc<T> {
type Response = super::RecoverResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RecoverRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::recover(&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 = RecoverSvc(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)
}
"/meta.StreamManagerService/ListRateLimits" => {
#[allow(non_camel_case_types)]
struct ListRateLimitsSvc<T: StreamManagerService>(pub Arc<T>);
impl<
T: StreamManagerService,
> tonic::server::UnaryService<super::ListRateLimitsRequest>
for ListRateLimitsSvc<T> {
type Response = super::ListRateLimitsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListRateLimitsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StreamManagerService>::list_rate_limits(
&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 = ListRateLimitsSvc(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 StreamManagerServiceServer<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 = "meta.StreamManagerService";
impl<T> tonic::server::NamedService for StreamManagerServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod cluster_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait ClusterService: std::marker::Send + std::marker::Sync + 'static {
async fn add_worker_node(
&self,
request: tonic::Request<super::AddWorkerNodeRequest>,
) -> std::result::Result<
tonic::Response<super::AddWorkerNodeResponse>,
tonic::Status,
>;
async fn activate_worker_node(
&self,
request: tonic::Request<super::ActivateWorkerNodeRequest>,
) -> std::result::Result<
tonic::Response<super::ActivateWorkerNodeResponse>,
tonic::Status,
>;
async fn delete_worker_node(
&self,
request: tonic::Request<super::DeleteWorkerNodeRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteWorkerNodeResponse>,
tonic::Status,
>;
async fn update_worker_node_schedulability(
&self,
request: tonic::Request<super::UpdateWorkerNodeSchedulabilityRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateWorkerNodeSchedulabilityResponse>,
tonic::Status,
>;
async fn list_all_nodes(
&self,
request: tonic::Request<super::ListAllNodesRequest>,
) -> std::result::Result<
tonic::Response<super::ListAllNodesResponse>,
tonic::Status,
>;
async fn get_cluster_recovery_status(
&self,
request: tonic::Request<super::GetClusterRecoveryStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetClusterRecoveryStatusResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ClusterServiceServer<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> ClusterServiceServer<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 ClusterServiceServer<T>
where
T: ClusterService,
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() {
"/meta.ClusterService/AddWorkerNode" => {
#[allow(non_camel_case_types)]
struct AddWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
impl<
T: ClusterService,
> tonic::server::UnaryService<super::AddWorkerNodeRequest>
for AddWorkerNodeSvc<T> {
type Response = super::AddWorkerNodeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AddWorkerNodeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterService>::add_worker_node(&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 = AddWorkerNodeSvc(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)
}
"/meta.ClusterService/ActivateWorkerNode" => {
#[allow(non_camel_case_types)]
struct ActivateWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
impl<
T: ClusterService,
> tonic::server::UnaryService<super::ActivateWorkerNodeRequest>
for ActivateWorkerNodeSvc<T> {
type Response = super::ActivateWorkerNodeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ActivateWorkerNodeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterService>::activate_worker_node(&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 = ActivateWorkerNodeSvc(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)
}
"/meta.ClusterService/DeleteWorkerNode" => {
#[allow(non_camel_case_types)]
struct DeleteWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
impl<
T: ClusterService,
> tonic::server::UnaryService<super::DeleteWorkerNodeRequest>
for DeleteWorkerNodeSvc<T> {
type Response = super::DeleteWorkerNodeResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::DeleteWorkerNodeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterService>::delete_worker_node(&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 = DeleteWorkerNodeSvc(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)
}
"/meta.ClusterService/UpdateWorkerNodeSchedulability" => {
#[allow(non_camel_case_types)]
struct UpdateWorkerNodeSchedulabilitySvc<T: ClusterService>(
pub Arc<T>,
);
impl<
T: ClusterService,
> tonic::server::UnaryService<
super::UpdateWorkerNodeSchedulabilityRequest,
> for UpdateWorkerNodeSchedulabilitySvc<T> {
type Response = super::UpdateWorkerNodeSchedulabilityResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::UpdateWorkerNodeSchedulabilityRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterService>::update_worker_node_schedulability(
&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 = UpdateWorkerNodeSchedulabilitySvc(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)
}
"/meta.ClusterService/ListAllNodes" => {
#[allow(non_camel_case_types)]
struct ListAllNodesSvc<T: ClusterService>(pub Arc<T>);
impl<
T: ClusterService,
> tonic::server::UnaryService<super::ListAllNodesRequest>
for ListAllNodesSvc<T> {
type Response = super::ListAllNodesResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListAllNodesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterService>::list_all_nodes(&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 = ListAllNodesSvc(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)
}
"/meta.ClusterService/GetClusterRecoveryStatus" => {
#[allow(non_camel_case_types)]
struct GetClusterRecoveryStatusSvc<T: ClusterService>(pub Arc<T>);
impl<
T: ClusterService,
> tonic::server::UnaryService<super::GetClusterRecoveryStatusRequest>
for GetClusterRecoveryStatusSvc<T> {
type Response = super::GetClusterRecoveryStatusResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::GetClusterRecoveryStatusRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterService>::get_cluster_recovery_status(
&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 = GetClusterRecoveryStatusSvc(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 ClusterServiceServer<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 = "meta.ClusterService";
impl<T> tonic::server::NamedService for ClusterServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod notification_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait NotificationService: std::marker::Send + std::marker::Sync + 'static {
type SubscribeStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::SubscribeResponse, tonic::Status>,
>
+ std::marker::Send
+ 'static;
async fn subscribe(
&self,
request: tonic::Request<super::SubscribeRequest>,
) -> std::result::Result<tonic::Response<Self::SubscribeStream>, tonic::Status>;
}
#[derive(Debug)]
pub struct NotificationServiceServer<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> NotificationServiceServer<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 NotificationServiceServer<T>
where
T: NotificationService,
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() {
"/meta.NotificationService/Subscribe" => {
#[allow(non_camel_case_types)]
struct SubscribeSvc<T: NotificationService>(pub Arc<T>);
impl<
T: NotificationService,
> tonic::server::ServerStreamingService<super::SubscribeRequest>
for SubscribeSvc<T> {
type Response = super::SubscribeResponse;
type ResponseStream = T::SubscribeStream;
type Future = BoxFuture<
tonic::Response<Self::ResponseStream>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SubscribeRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as NotificationService>::subscribe(&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 = SubscribeSvc(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.server_streaming(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 NotificationServiceServer<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 = "meta.NotificationService";
impl<T> tonic::server::NamedService for NotificationServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod scale_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait ScaleService: std::marker::Send + std::marker::Sync + 'static {
async fn get_cluster_info(
&self,
request: tonic::Request<super::GetClusterInfoRequest>,
) -> std::result::Result<
tonic::Response<super::GetClusterInfoResponse>,
tonic::Status,
>;
async fn reschedule(
&self,
request: tonic::Request<super::RescheduleRequest>,
) -> std::result::Result<
tonic::Response<super::RescheduleResponse>,
tonic::Status,
>;
async fn update_streaming_job_node_labels(
&self,
request: tonic::Request<super::UpdateStreamingJobNodeLabelsRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateStreamingJobNodeLabelsResponse>,
tonic::Status,
>;
async fn get_serverless_streaming_jobs_status(
&self,
request: tonic::Request<super::GetServerlessStreamingJobsStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetServerlessStreamingJobsStatusResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ScaleServiceServer<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> ScaleServiceServer<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 ScaleServiceServer<T>
where
T: ScaleService,
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() {
"/meta.ScaleService/GetClusterInfo" => {
#[allow(non_camel_case_types)]
struct GetClusterInfoSvc<T: ScaleService>(pub Arc<T>);
impl<
T: ScaleService,
> tonic::server::UnaryService<super::GetClusterInfoRequest>
for GetClusterInfoSvc<T> {
type Response = super::GetClusterInfoResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetClusterInfoRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ScaleService>::get_cluster_info(&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 = GetClusterInfoSvc(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)
}
"/meta.ScaleService/Reschedule" => {
#[allow(non_camel_case_types)]
struct RescheduleSvc<T: ScaleService>(pub Arc<T>);
impl<
T: ScaleService,
> tonic::server::UnaryService<super::RescheduleRequest>
for RescheduleSvc<T> {
type Response = super::RescheduleResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::RescheduleRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ScaleService>::reschedule(&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 = RescheduleSvc(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)
}
"/meta.ScaleService/UpdateStreamingJobNodeLabels" => {
#[allow(non_camel_case_types)]
struct UpdateStreamingJobNodeLabelsSvc<T: ScaleService>(pub Arc<T>);
impl<
T: ScaleService,
> tonic::server::UnaryService<
super::UpdateStreamingJobNodeLabelsRequest,
> for UpdateStreamingJobNodeLabelsSvc<T> {
type Response = super::UpdateStreamingJobNodeLabelsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::UpdateStreamingJobNodeLabelsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ScaleService>::update_streaming_job_node_labels(
&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 = UpdateStreamingJobNodeLabelsSvc(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)
}
"/meta.ScaleService/GetServerlessStreamingJobsStatus" => {
#[allow(non_camel_case_types)]
struct GetServerlessStreamingJobsStatusSvc<T: ScaleService>(
pub Arc<T>,
);
impl<
T: ScaleService,
> tonic::server::UnaryService<
super::GetServerlessStreamingJobsStatusRequest,
> for GetServerlessStreamingJobsStatusSvc<T> {
type Response = super::GetServerlessStreamingJobsStatusResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::GetServerlessStreamingJobsStatusRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ScaleService>::get_serverless_streaming_jobs_status(
&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 = GetServerlessStreamingJobsStatusSvc(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 ScaleServiceServer<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 = "meta.ScaleService";
impl<T> tonic::server::NamedService for ScaleServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod meta_member_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait MetaMemberService: std::marker::Send + std::marker::Sync + 'static {
async fn members(
&self,
request: tonic::Request<super::MembersRequest>,
) -> std::result::Result<tonic::Response<super::MembersResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct MetaMemberServiceServer<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> MetaMemberServiceServer<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 MetaMemberServiceServer<T>
where
T: MetaMemberService,
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() {
"/meta.MetaMemberService/Members" => {
#[allow(non_camel_case_types)]
struct MembersSvc<T: MetaMemberService>(pub Arc<T>);
impl<
T: MetaMemberService,
> tonic::server::UnaryService<super::MembersRequest>
for MembersSvc<T> {
type Response = super::MembersResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MembersRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as MetaMemberService>::members(&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 = MembersSvc(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 MetaMemberServiceServer<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 = "meta.MetaMemberService";
impl<T> tonic::server::NamedService for MetaMemberServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod system_params_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait SystemParamsService: std::marker::Send + std::marker::Sync + 'static {
async fn get_system_params(
&self,
request: tonic::Request<super::GetSystemParamsRequest>,
) -> std::result::Result<
tonic::Response<super::GetSystemParamsResponse>,
tonic::Status,
>;
async fn set_system_param(
&self,
request: tonic::Request<super::SetSystemParamRequest>,
) -> std::result::Result<
tonic::Response<super::SetSystemParamResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct SystemParamsServiceServer<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> SystemParamsServiceServer<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 SystemParamsServiceServer<T>
where
T: SystemParamsService,
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() {
"/meta.SystemParamsService/GetSystemParams" => {
#[allow(non_camel_case_types)]
struct GetSystemParamsSvc<T: SystemParamsService>(pub Arc<T>);
impl<
T: SystemParamsService,
> tonic::server::UnaryService<super::GetSystemParamsRequest>
for GetSystemParamsSvc<T> {
type Response = super::GetSystemParamsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetSystemParamsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as SystemParamsService>::get_system_params(
&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 = GetSystemParamsSvc(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)
}
"/meta.SystemParamsService/SetSystemParam" => {
#[allow(non_camel_case_types)]
struct SetSystemParamSvc<T: SystemParamsService>(pub Arc<T>);
impl<
T: SystemParamsService,
> tonic::server::UnaryService<super::SetSystemParamRequest>
for SetSystemParamSvc<T> {
type Response = super::SetSystemParamResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetSystemParamRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as SystemParamsService>::set_system_param(
&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 = SetSystemParamSvc(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 SystemParamsServiceServer<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 = "meta.SystemParamsService";
impl<T> tonic::server::NamedService for SystemParamsServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod session_param_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait SessionParamService: std::marker::Send + std::marker::Sync + 'static {
async fn get_session_params(
&self,
request: tonic::Request<super::GetSessionParamsRequest>,
) -> std::result::Result<
tonic::Response<super::GetSessionParamsResponse>,
tonic::Status,
>;
async fn set_session_param(
&self,
request: tonic::Request<super::SetSessionParamRequest>,
) -> std::result::Result<
tonic::Response<super::SetSessionParamResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct SessionParamServiceServer<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> SessionParamServiceServer<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 SessionParamServiceServer<T>
where
T: SessionParamService,
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() {
"/meta.SessionParamService/GetSessionParams" => {
#[allow(non_camel_case_types)]
struct GetSessionParamsSvc<T: SessionParamService>(pub Arc<T>);
impl<
T: SessionParamService,
> tonic::server::UnaryService<super::GetSessionParamsRequest>
for GetSessionParamsSvc<T> {
type Response = super::GetSessionParamsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetSessionParamsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as SessionParamService>::get_session_params(
&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 = GetSessionParamsSvc(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)
}
"/meta.SessionParamService/SetSessionParam" => {
#[allow(non_camel_case_types)]
struct SetSessionParamSvc<T: SessionParamService>(pub Arc<T>);
impl<
T: SessionParamService,
> tonic::server::UnaryService<super::SetSessionParamRequest>
for SetSessionParamSvc<T> {
type Response = super::SetSessionParamResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::SetSessionParamRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as SessionParamService>::set_session_param(
&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 = SetSessionParamSvc(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 SessionParamServiceServer<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 = "meta.SessionParamService";
impl<T> tonic::server::NamedService for SessionParamServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod serving_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait ServingService: std::marker::Send + std::marker::Sync + 'static {
async fn get_serving_vnode_mappings(
&self,
request: tonic::Request<super::GetServingVnodeMappingsRequest>,
) -> std::result::Result<
tonic::Response<super::GetServingVnodeMappingsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ServingServiceServer<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> ServingServiceServer<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 ServingServiceServer<T>
where
T: ServingService,
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() {
"/meta.ServingService/GetServingVnodeMappings" => {
#[allow(non_camel_case_types)]
struct GetServingVnodeMappingsSvc<T: ServingService>(pub Arc<T>);
impl<
T: ServingService,
> tonic::server::UnaryService<super::GetServingVnodeMappingsRequest>
for GetServingVnodeMappingsSvc<T> {
type Response = super::GetServingVnodeMappingsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::GetServingVnodeMappingsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ServingService>::get_serving_vnode_mappings(
&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 = GetServingVnodeMappingsSvc(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 ServingServiceServer<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 = "meta.ServingService";
impl<T> tonic::server::NamedService for ServingServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod event_log_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait EventLogService: std::marker::Send + std::marker::Sync + 'static {
async fn list_event_log(
&self,
request: tonic::Request<super::ListEventLogRequest>,
) -> std::result::Result<
tonic::Response<super::ListEventLogResponse>,
tonic::Status,
>;
async fn add_event_log(
&self,
request: tonic::Request<super::AddEventLogRequest>,
) -> std::result::Result<
tonic::Response<super::AddEventLogResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct EventLogServiceServer<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> EventLogServiceServer<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 EventLogServiceServer<T>
where
T: EventLogService,
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() {
"/meta.EventLogService/ListEventLog" => {
#[allow(non_camel_case_types)]
struct ListEventLogSvc<T: EventLogService>(pub Arc<T>);
impl<
T: EventLogService,
> tonic::server::UnaryService<super::ListEventLogRequest>
for ListEventLogSvc<T> {
type Response = super::ListEventLogResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::ListEventLogRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as EventLogService>::list_event_log(&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 = ListEventLogSvc(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)
}
"/meta.EventLogService/AddEventLog" => {
#[allow(non_camel_case_types)]
struct AddEventLogSvc<T: EventLogService>(pub Arc<T>);
impl<
T: EventLogService,
> tonic::server::UnaryService<super::AddEventLogRequest>
for AddEventLogSvc<T> {
type Response = super::AddEventLogResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::AddEventLogRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as EventLogService>::add_event_log(&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 = AddEventLogSvc(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 EventLogServiceServer<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 = "meta.EventLogService";
impl<T> tonic::server::NamedService for EventLogServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
pub mod cluster_limit_service_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[async_trait]
pub trait ClusterLimitService: std::marker::Send + std::marker::Sync + 'static {
async fn get_cluster_limits(
&self,
request: tonic::Request<super::GetClusterLimitsRequest>,
) -> std::result::Result<
tonic::Response<super::GetClusterLimitsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct ClusterLimitServiceServer<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> ClusterLimitServiceServer<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 ClusterLimitServiceServer<T>
where
T: ClusterLimitService,
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() {
"/meta.ClusterLimitService/GetClusterLimits" => {
#[allow(non_camel_case_types)]
struct GetClusterLimitsSvc<T: ClusterLimitService>(pub Arc<T>);
impl<
T: ClusterLimitService,
> tonic::server::UnaryService<super::GetClusterLimitsRequest>
for GetClusterLimitsSvc<T> {
type Response = super::GetClusterLimitsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::GetClusterLimitsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as ClusterLimitService>::get_cluster_limits(
&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 = GetClusterLimitsSvc(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 ClusterLimitServiceServer<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 = "meta.ClusterLimitService";
impl<T> tonic::server::NamedService for ClusterLimitServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}