goosefs-sdk 0.1.0

GooseFS Rust gRPC Client - Direct gRPC client for GooseFS Master/Worker
Documentation
// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PMode {
    #[prost(enumeration = "Bits", required, tag = "1")]
    pub owner_bits: i32,
    #[prost(enumeration = "Bits", required, tag = "2")]
    pub group_bits: i32,
    #[prost(enumeration = "Bits", required, tag = "3")]
    pub other_bits: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BlockInfo {
    #[prost(int64, optional, tag = "1")]
    pub block_id: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "2")]
    pub length: ::core::option::Option<i64>,
    #[prost(int32, optional, tag = "3")]
    pub max_replicas: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockLocation {
    #[prost(int64, optional, tag = "1")]
    pub worker_id: ::core::option::Option<i64>,
    #[prost(message, optional, tag = "2")]
    pub worker_address: ::core::option::Option<WorkerNetAddress>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metric {
    #[prost(string, optional, tag = "1")]
    pub instance: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub source: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(double, optional, tag = "4")]
    pub value: ::core::option::Option<f64>,
    #[prost(enumeration = "MetricType", required, tag = "5")]
    pub metric_type: i32,
    #[prost(map = "string, string", tag = "6")]
    pub tags: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigProperty {
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub source: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Command {
    #[prost(enumeration = "CommandType", optional, tag = "1")]
    pub command_type: ::core::option::Option<i32>,
    #[prost(int64, repeated, packed = "false", tag = "2")]
    pub data: ::prost::alloc::vec::Vec<i64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalityTier {
    #[prost(string, optional, tag = "1")]
    pub tier_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TieredIdentity {
    #[prost(message, repeated, tag = "1")]
    pub tiers: ::prost::alloc::vec::Vec<LocalityTier>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetAddress {
    #[prost(string, optional, tag = "1")]
    pub host: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag = "2")]
    pub rpc_port: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "3")]
    pub tencent_cloud_vpc_mapping_host: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    #[prost(int32, optional, tag = "4")]
    pub tencent_cloud_vpc_mapping_port: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerNetAddress {
    #[prost(string, optional, tag = "1")]
    pub host: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag = "2")]
    pub rpc_port: ::core::option::Option<i32>,
    #[prost(int32, optional, tag = "3")]
    pub data_port: ::core::option::Option<i32>,
    #[prost(int32, optional, tag = "4")]
    pub web_port: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "5")]
    pub domain_socket_path: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "6")]
    pub tiered_identity: ::core::option::Option<TieredIdentity>,
    #[prost(string, optional, tag = "7")]
    pub container_host: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag = "8")]
    pub secure_rpc_port: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "9")]
    pub tencent_cloud_vpc_mapping_host: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    #[prost(int32, optional, tag = "10")]
    pub tencent_cloud_vpc_mapping_port: ::core::option::Option<i32>,
    #[prost(int32, optional, tag = "11")]
    pub tencent_cloud_vpc_mapping_data_port: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RetryInfo {
    #[prost(bool, optional, tag = "1")]
    pub is_retryable: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ErrorInfo {
    #[prost(enumeration = "ErrorType", optional, tag = "1")]
    pub error_type: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WorkerRateLimit {
    #[prost(double, optional, tag = "1")]
    pub rate_limit: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Bits {
    None = 1,
    Execute = 2,
    Write = 3,
    WriteExecute = 4,
    Read = 5,
    ReadExecute = 6,
    ReadWrite = 7,
    All = 8,
}
impl Bits {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::None => "NONE",
            Self::Execute => "EXECUTE",
            Self::Write => "WRITE",
            Self::WriteExecute => "WRITE_EXECUTE",
            Self::Read => "READ",
            Self::ReadExecute => "READ_EXECUTE",
            Self::ReadWrite => "READ_WRITE",
            Self::All => "ALL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NONE" => Some(Self::None),
            "EXECUTE" => Some(Self::Execute),
            "WRITE" => Some(Self::Write),
            "WRITE_EXECUTE" => Some(Self::WriteExecute),
            "READ" => Some(Self::Read),
            "READ_EXECUTE" => Some(Self::ReadExecute),
            "READ_WRITE" => Some(Self::ReadWrite),
            "ALL" => Some(Self::All),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MetricType {
    Gauge = 0,
    Counter = 1,
    Meter = 2,
    Timer = 3,
    Histogram = 4,
}
impl MetricType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Gauge => "GAUGE",
            Self::Counter => "COUNTER",
            Self::Meter => "METER",
            Self::Timer => "TIMER",
            Self::Histogram => "HISTOGRAM",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GAUGE" => Some(Self::Gauge),
            "COUNTER" => Some(Self::Counter),
            "METER" => Some(Self::Meter),
            "TIMER" => Some(Self::Timer),
            "HISTOGRAM" => Some(Self::Histogram),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CommandType {
    Unknown = 0,
    Nothing = 1,
    Register = 2,
    Free = 3,
}
impl CommandType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unknown => "Unknown",
            Self::Nothing => "Nothing",
            Self::Register => "Register",
            Self::Free => "Free",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "Unknown" => Some(Self::Unknown),
            "Nothing" => Some(Self::Nothing),
            "Register" => Some(Self::Register),
            "Free" => Some(Self::Free),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorType {
    User = 0,
    Internal = 1,
    External = 2,
}
impl ErrorType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::User => "User",
            Self::Internal => "Internal",
            Self::External => "External",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "User" => Some(Self::User),
            "Internal" => Some(Self::Internal),
            "External" => Some(Self::External),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkerStatus {
    Init = 0,
    Active = 1,
    Inactive = 2,
}
impl WorkerStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Init => "INIT",
            Self::Active => "ACTIVE",
            Self::Inactive => "INACTIVE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INIT" => Some(Self::Init),
            "ACTIVE" => Some(Self::Active),
            "INACTIVE" => Some(Self::Inactive),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ManageWorkerAction {
    Register = 0,
    Delete = 1,
    Isolate = 2,
    Activate = 3,
}
impl ManageWorkerAction {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Register => "REGISTER",
            Self::Delete => "DELETE",
            Self::Isolate => "ISOLATE",
            Self::Activate => "ACTIVATE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "REGISTER" => Some(Self::Register),
            "DELETE" => Some(Self::Delete),
            "ISOLATE" => Some(Self::Isolate),
            "ACTIVATE" => Some(Self::Activate),
            _ => None,
        }
    }
}