#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupMeta {
#[prost(uint64, tag = "1")]
pub cluster_id: u64,
#[prost(string, tag = "2")]
pub cluster_version: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub br_version: ::prost::alloc::string::String,
#[prost(int32, tag = "12")]
pub version: i32,
#[prost(message, repeated, tag = "4")]
pub files: ::prost::alloc::vec::Vec<File>,
#[prost(message, optional, tag = "13")]
pub file_index: ::core::option::Option<MetaFile>,
#[prost(uint64, tag = "5")]
pub start_version: u64,
#[prost(uint64, tag = "6")]
pub end_version: u64,
#[prost(message, repeated, tag = "7")]
pub schemas: ::prost::alloc::vec::Vec<Schema>,
#[prost(message, optional, tag = "14")]
pub schema_index: ::core::option::Option<MetaFile>,
#[prost(bool, tag = "8")]
pub is_raw_kv: bool,
#[prost(message, repeated, tag = "9")]
pub raw_ranges: ::prost::alloc::vec::Vec<RawRange>,
#[prost(message, optional, tag = "15")]
pub raw_range_index: ::core::option::Option<MetaFile>,
#[prost(bytes = "vec", tag = "10")]
pub ddls: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "16")]
pub ddl_indexes: ::core::option::Option<MetaFile>,
#[prost(string, tag = "17")]
pub backup_result: ::prost::alloc::string::String,
#[prost(enumeration = "super::kvrpcpb::ApiVersion", tag = "18")]
pub api_version: i32,
#[prost(message, repeated, tag = "19")]
pub policies: ::prost::alloc::vec::Vec<PlacementPolicy>,
#[prost(string, tag = "20")]
pub new_collations_enabled: ::prost::alloc::string::String,
#[prost(bool, tag = "21")]
pub is_txn_kv: bool,
#[prost(message, repeated, tag = "22")]
pub db_maps: ::prost::alloc::vec::Vec<PitrDbMap>,
#[prost(enumeration = "BackupMode", tag = "23")]
pub mode: i32,
#[prost(message, repeated, tag = "24")]
pub ranges: ::prost::alloc::vec::Vec<BackupRange>,
#[prost(uint64, tag = "25")]
pub backup_size: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupRange {
#[prost(bytes = "vec", tag = "1")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "3")]
pub files: ::prost::alloc::vec::Vec<File>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct File {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub sha256: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "5")]
pub start_version: u64,
#[prost(uint64, tag = "6")]
pub end_version: u64,
#[prost(uint64, tag = "7")]
pub crc64xor: u64,
#[prost(uint64, tag = "8")]
pub total_kvs: u64,
#[prost(uint64, tag = "9")]
pub total_bytes: u64,
#[prost(string, tag = "10")]
pub cf: ::prost::alloc::string::String,
#[prost(uint64, tag = "11")]
pub size: u64,
#[prost(bytes = "vec", tag = "12")]
pub cipher_iv: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetaFile {
#[prost(message, repeated, tag = "1")]
pub meta_files: ::prost::alloc::vec::Vec<File>,
#[prost(message, repeated, tag = "2")]
pub data_files: ::prost::alloc::vec::Vec<File>,
#[prost(message, repeated, tag = "3")]
pub schemas: ::prost::alloc::vec::Vec<Schema>,
#[prost(message, repeated, tag = "4")]
pub raw_ranges: ::prost::alloc::vec::Vec<RawRange>,
#[prost(message, repeated, tag = "6")]
pub backup_ranges: ::prost::alloc::vec::Vec<BackupRange>,
#[prost(bytes = "vec", repeated, tag = "5")]
pub ddls: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlacementPolicy {
#[prost(bytes = "vec", tag = "1")]
pub info: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schema {
#[prost(bytes = "vec", tag = "1")]
pub db: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub table: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "3")]
pub crc64xor: u64,
#[prost(uint64, tag = "4")]
pub total_kvs: u64,
#[prost(uint64, tag = "5")]
pub total_bytes: u64,
#[prost(uint32, tag = "6")]
pub tiflash_replicas: u32,
#[prost(bytes = "vec", tag = "7")]
pub stats: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdMap {
#[prost(int64, tag = "1")]
pub upstream_id: i64,
#[prost(int64, tag = "2")]
pub downstream_id: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PitrTableMap {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub id_map: ::core::option::Option<IdMap>,
#[prost(message, repeated, tag = "3")]
pub partitions: ::prost::alloc::vec::Vec<IdMap>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PitrDbMap {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub id_map: ::core::option::Option<IdMap>,
#[prost(message, repeated, tag = "3")]
pub tables: ::prost::alloc::vec::Vec<PitrTableMap>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawRange {
#[prost(bytes = "vec", tag = "1")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub cf: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterIdError {
#[prost(uint64, tag = "1")]
pub current: u64,
#[prost(uint64, tag = "2")]
pub request: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
#[prost(string, tag = "1")]
pub msg: ::prost::alloc::string::String,
#[prost(oneof = "error::Detail", tags = "3, 4, 5")]
pub detail: ::core::option::Option<error::Detail>,
}
pub mod error {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Detail {
#[prost(message, tag = "3")]
ClusterIdError(super::ClusterIdError),
#[prost(message, tag = "4")]
KvError(super::super::kvrpcpb::KeyError),
#[prost(message, tag = "5")]
RegionError(super::super::errorpb::Error),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CipherInfo {
#[prost(enumeration = "super::encryptionpb::EncryptionMethod", tag = "1")]
pub cipher_type: i32,
#[prost(bytes = "vec", tag = "2")]
pub cipher_key: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupRequest {
#[prost(uint64, tag = "1")]
pub cluster_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(uint64, tag = "4")]
pub start_version: u64,
#[prost(uint64, tag = "5")]
pub end_version: u64,
#[prost(uint64, tag = "7")]
pub rate_limit: u64,
#[prost(uint32, tag = "8")]
pub concurrency: u32,
#[prost(message, optional, tag = "9")]
pub storage_backend: ::core::option::Option<StorageBackend>,
#[prost(bool, tag = "10")]
pub is_raw_kv: bool,
#[prost(string, tag = "11")]
pub cf: ::prost::alloc::string::String,
#[prost(enumeration = "CompressionType", tag = "12")]
pub compression_type: i32,
#[prost(int32, tag = "13")]
pub compression_level: i32,
#[prost(message, optional, tag = "14")]
pub cipher_info: ::core::option::Option<CipherInfo>,
#[prost(enumeration = "super::kvrpcpb::ApiVersion", tag = "15")]
pub dst_api_version: i32,
#[prost(message, repeated, tag = "16")]
pub sub_ranges: ::prost::alloc::vec::Vec<super::kvrpcpb::KeyRange>,
#[prost(bool, tag = "17")]
pub replica_read: bool,
#[prost(enumeration = "BackupMode", tag = "18")]
pub mode: i32,
#[prost(string, tag = "19")]
pub unique_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "20")]
pub context: ::core::option::Option<super::kvrpcpb::Context>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamBackupTaskInfo {
#[prost(message, optional, tag = "1")]
pub storage: ::core::option::Option<StorageBackend>,
#[prost(uint64, tag = "2")]
pub start_ts: u64,
#[prost(uint64, tag = "3")]
pub end_ts: u64,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub table_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "CompressionType", tag = "6")]
pub compression_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StorageBackend {
#[prost(oneof = "storage_backend::Backend", tags = "1, 2, 3, 4, 5, 6, 7")]
pub backend: ::core::option::Option<storage_backend::Backend>,
}
pub mod storage_backend {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Backend {
#[prost(message, tag = "1")]
Noop(super::Noop),
#[prost(message, tag = "2")]
Local(super::Local),
#[prost(message, tag = "3")]
S3(super::S3),
#[prost(message, tag = "4")]
Gcs(super::Gcs),
#[prost(message, tag = "5")]
CloudDynamic(super::CloudDynamic),
#[prost(message, tag = "6")]
Hdfs(super::Hdfs),
#[prost(message, tag = "7")]
AzureBlobStorage(super::AzureBlobStorage),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Noop {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Local {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct S3 {
#[prost(string, tag = "1")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub region: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub bucket: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub prefix: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub storage_class: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub sse: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub acl: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub access_key: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub secret_access_key: ::prost::alloc::string::String,
#[prost(bool, tag = "10")]
pub force_path_style: bool,
#[prost(string, tag = "11")]
pub sse_kms_key_id: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub role_arn: ::prost::alloc::string::String,
#[prost(string, tag = "13")]
pub external_id: ::prost::alloc::string::String,
#[prost(bool, tag = "14")]
pub object_lock_enabled: bool,
#[prost(string, tag = "15")]
pub session_token: ::prost::alloc::string::String,
#[prost(string, tag = "16")]
pub provider: ::prost::alloc::string::String,
#[prost(string, tag = "17")]
pub profile: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Gcs {
#[prost(string, tag = "1")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub bucket: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub prefix: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub storage_class: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub predefined_acl: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub credentials_blob: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureCustomerKey {
#[prost(string, tag = "1")]
pub encryption_key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub encryption_key_sha256: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureBlobStorage {
#[prost(string, tag = "1")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub bucket: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub prefix: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub storage_class: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub account_name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub shared_key: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub access_sig: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub encryption_scope: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub encryption_key: ::core::option::Option<AzureCustomerKey>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Bucket {
#[prost(string, tag = "1")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub region: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub bucket: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub prefix: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub storage_class: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudDynamic {
#[prost(message, optional, tag = "1")]
pub bucket: ::core::option::Option<Bucket>,
#[prost(string, tag = "2")]
pub provider_name: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "3")]
pub attrs: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hdfs {
#[prost(string, tag = "1")]
pub remote: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<Error>,
#[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, repeated, tag = "4")]
pub files: ::prost::alloc::vec::Vec<File>,
#[prost(enumeration = "super::kvrpcpb::ApiVersion", tag = "5")]
pub api_version: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CleanupRequest {
#[prost(string, tag = "1")]
pub unique_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CleanupResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<Error>,
#[prost(bool, tag = "2")]
pub success: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrepareRequest {
#[prost(bool, tag = "1")]
pub save_to_storage: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrepareResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<Error>,
#[prost(string, tag = "2")]
pub unique_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub collect_file_count: u64,
#[prost(uint64, tag = "4")]
pub collect_file_size: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAdminRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAdminResponse {
#[prost(message, optional, tag = "1")]
pub error: ::core::option::Option<Error>,
#[prost(message, optional, tag = "2")]
pub region: ::core::option::Option<super::metapb::Region>,
#[prost(bool, tag = "3")]
pub has_pending_admin: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalStorageRestoreRequest {
#[prost(message, optional, tag = "1")]
pub storage_backend: ::core::option::Option<StorageBackend>,
#[prost(string, tag = "2")]
pub object_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub restore_name: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub content_length: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalStorageRestoreResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalStorageSaveRequest {
#[prost(message, optional, tag = "1")]
pub storage_backend: ::core::option::Option<StorageBackend>,
#[prost(string, tag = "2")]
pub object_name: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub content_length: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalStorageSaveResponse {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(message, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<DataFileInfo>,
#[prost(message, repeated, tag = "6")]
pub file_groups: ::prost::alloc::vec::Vec<DataFileGroup>,
#[prost(int64, tag = "2")]
pub store_id: i64,
#[prost(uint64, tag = "3")]
pub resolved_ts: u64,
#[prost(uint64, tag = "4")]
pub max_ts: u64,
#[prost(uint64, tag = "5")]
pub min_ts: u64,
#[prost(enumeration = "MetaVersion", tag = "7")]
pub meta_version: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataFileGroup {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub data_files_info: ::prost::alloc::vec::Vec<DataFileInfo>,
#[prost(uint64, tag = "3")]
pub min_ts: u64,
#[prost(uint64, tag = "4")]
pub max_ts: u64,
#[prost(uint64, tag = "5")]
pub min_resolved_ts: u64,
#[prost(uint64, tag = "6")]
pub length: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DataFileInfo {
#[prost(bytes = "vec", tag = "1")]
pub sha256: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub number_of_entries: i64,
#[prost(uint64, tag = "4")]
pub min_ts: u64,
#[prost(uint64, tag = "5")]
pub max_ts: u64,
#[prost(uint64, tag = "6")]
pub resolved_ts: u64,
#[prost(int64, tag = "7")]
pub region_id: i64,
#[prost(bytes = "vec", tag = "8")]
pub start_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "9")]
pub end_key: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "10")]
pub cf: ::prost::alloc::string::String,
#[prost(enumeration = "FileType", tag = "11")]
pub r#type: i32,
#[prost(bool, tag = "12")]
pub is_meta: bool,
#[prost(int64, tag = "13")]
pub table_id: i64,
#[prost(uint64, tag = "14")]
pub length: u64,
#[prost(uint64, tag = "15")]
pub min_begin_ts_in_default_cf: u64,
#[prost(uint64, tag = "16")]
pub range_offset: u64,
#[prost(uint64, tag = "17")]
pub range_length: u64,
#[prost(enumeration = "CompressionType", tag = "18")]
pub compression_type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamBackupError {
#[prost(uint64, tag = "1")]
pub happen_at: u64,
#[prost(string, tag = "2")]
pub error_code: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub error_message: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub store_id: u64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CompressionType {
Unknown = 0,
Lz4 = 1,
Snappy = 2,
Zstd = 3,
}
impl CompressionType {
pub fn as_str_name(&self) -> &'static str {
match self {
CompressionType::Unknown => "UNKNOWN",
CompressionType::Lz4 => "LZ4",
CompressionType::Snappy => "SNAPPY",
CompressionType::Zstd => "ZSTD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"LZ4" => Some(Self::Lz4),
"SNAPPY" => Some(Self::Snappy),
"ZSTD" => Some(Self::Zstd),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BackupMode {
Scan = 0,
File = 1,
}
impl BackupMode {
pub fn as_str_name(&self) -> &'static str {
match self {
BackupMode::Scan => "SCAN",
BackupMode::File => "FILE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCAN" => Some(Self::Scan),
"FILE" => Some(Self::File),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MetaVersion {
V1 = 0,
V2 = 1,
}
impl MetaVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
MetaVersion::V1 => "V1",
MetaVersion::V2 => "V2",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"V1" => Some(Self::V1),
"V2" => Some(Self::V2),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileType {
Delete = 0,
Put = 1,
}
impl FileType {
pub fn as_str_name(&self) -> &'static str {
match self {
FileType::Delete => "Delete",
FileType::Put => "Put",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Delete" => Some(Self::Delete),
"Put" => Some(Self::Put),
_ => None,
}
}
}
pub mod backup_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 BackupClient<T> {
inner: tonic::client::Grpc<T>,
}
impl BackupClient<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> BackupClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_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,
) -> BackupClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
BackupClient::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 backup(
&mut self,
request: impl tonic::IntoRequest<super::BackupRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::BackupResponse>>,
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("/backup.Backup/backup");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("backup.Backup", "backup"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn check_pending_admin_op(
&mut self,
request: impl tonic::IntoRequest<super::CheckAdminRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::CheckAdminResponse>>,
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(
"/backup.Backup/CheckPendingAdminOp",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("backup.Backup", "CheckPendingAdminOp"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn prepare(
&mut self,
request: impl tonic::IntoRequest<super::PrepareRequest>,
) -> std::result::Result<
tonic::Response<super::PrepareResponse>,
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("/backup.Backup/prepare");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("backup.Backup", "prepare"));
self.inner.unary(req, path, codec).await
}
pub async fn cleanup(
&mut self,
request: impl tonic::IntoRequest<super::CleanupRequest>,
) -> std::result::Result<
tonic::Response<super::CleanupResponse>,
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("/backup.Backup/cleanup");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("backup.Backup", "cleanup"));
self.inner.unary(req, path, codec).await
}
}
}
pub mod external_storage_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 ExternalStorageClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ExternalStorageClient<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> ExternalStorageClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_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,
) -> ExternalStorageClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ExternalStorageClient::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 restore(
&mut self,
request: impl tonic::IntoRequest<super::ExternalStorageRestoreRequest>,
) -> std::result::Result<
tonic::Response<super::ExternalStorageRestoreResponse>,
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(
"/backup.ExternalStorage/restore",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("backup.ExternalStorage", "restore"));
self.inner.unary(req, path, codec).await
}
pub async fn save(
&mut self,
request: impl tonic::IntoRequest<super::ExternalStorageSaveRequest>,
) -> std::result::Result<
tonic::Response<super::ExternalStorageSaveResponse>,
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(
"/backup.ExternalStorage/save",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("backup.ExternalStorage", "save"));
self.inner.unary(req, path, codec).await
}
}
}