#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(uint32, tag = "2")]
pub max_peer_count: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoreLabel {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Store {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(string, tag = "2")]
pub address: ::prost::alloc::string::String,
#[prost(enumeration = "StoreState", tag = "3")]
pub state: i32,
#[prost(message, repeated, tag = "4")]
pub labels: ::prost::alloc::vec::Vec<StoreLabel>,
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub peer_address: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub status_address: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub git_hash: ::prost::alloc::string::String,
#[prost(int64, tag = "9")]
pub start_timestamp: i64,
#[prost(string, tag = "10")]
pub deploy_path: ::prost::alloc::string::String,
#[prost(int64, tag = "11")]
pub last_heartbeat: i64,
#[prost(bool, tag = "12")]
pub physically_destroyed: bool,
#[prost(enumeration = "NodeState", tag = "13")]
pub node_state: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegionEpoch {
#[prost(uint64, tag = "1")]
pub conf_ver: u64,
#[prost(uint64, tag = "2")]
pub version: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BucketStats {
#[prost(uint64, repeated, tag = "1")]
pub read_bytes: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "2")]
pub write_bytes: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "3")]
pub read_qps: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "4")]
pub write_qps: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "5")]
pub read_keys: ::prost::alloc::vec::Vec<u64>,
#[prost(uint64, repeated, tag = "6")]
pub write_keys: ::prost::alloc::vec::Vec<u64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Buckets {
#[prost(uint64, tag = "1")]
pub region_id: u64,
#[prost(uint64, tag = "2")]
pub version: u64,
#[prost(bytes = "vec", repeated, tag = "3")]
pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(message, optional, tag = "4")]
pub stats: ::core::option::Option<BucketStats>,
#[prost(uint64, tag = "5")]
pub period_in_ms: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Region {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(bytes = "vec", tag = "2")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub region_epoch: ::core::option::Option<RegionEpoch>,
#[prost(message, repeated, tag = "5")]
pub peers: ::prost::alloc::vec::Vec<Peer>,
#[prost(message, optional, tag = "6")]
pub encryption_meta: ::core::option::Option<super::encryptionpb::EncryptionMeta>,
#[prost(bool, tag = "7")]
pub is_in_flashback: bool,
#[prost(uint64, tag = "8")]
pub flashback_start_ts: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Peer {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(uint64, tag = "2")]
pub store_id: u64,
#[prost(enumeration = "PeerRole", tag = "3")]
pub role: i32,
#[prost(bool, tag = "4")]
pub is_witness: bool,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StoreState {
Up = 0,
Offline = 1,
Tombstone = 2,
}
impl StoreState {
pub fn as_str_name(&self) -> &'static str {
match self {
StoreState::Up => "Up",
StoreState::Offline => "Offline",
StoreState::Tombstone => "Tombstone",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Up" => Some(Self::Up),
"Offline" => Some(Self::Offline),
"Tombstone" => Some(Self::Tombstone),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NodeState {
Preparing = 0,
Serving = 1,
Removing = 2,
Removed = 3,
}
impl NodeState {
pub fn as_str_name(&self) -> &'static str {
match self {
NodeState::Preparing => "Preparing",
NodeState::Serving => "Serving",
NodeState::Removing => "Removing",
NodeState::Removed => "Removed",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Preparing" => Some(Self::Preparing),
"Serving" => Some(Self::Serving),
"Removing" => Some(Self::Removing),
"Removed" => Some(Self::Removed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PeerRole {
Voter = 0,
Learner = 1,
IncomingVoter = 2,
DemotingVoter = 3,
}
impl PeerRole {
pub fn as_str_name(&self) -> &'static str {
match self {
PeerRole::Voter => "Voter",
PeerRole::Learner => "Learner",
PeerRole::IncomingVoter => "IncomingVoter",
PeerRole::DemotingVoter => "DemotingVoter",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Voter" => Some(Self::Voter),
"Learner" => Some(Self::Learner),
"IncomingVoter" => Some(Self::IncomingVoter),
"DemotingVoter" => Some(Self::DemotingVoter),
_ => None,
}
}
}