#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GossipFrame {
#[prost(uint32, tag = "1")]
pub r#gen: u32,
#[prost(message, repeated, tag = "2")]
pub peers: ::prost::alloc::vec::Vec<PeerAnnouncement>,
#[prost(bytes = "vec", tag = "3")]
pub sender_id: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerAnnouncement {
#[prost(bytes = "vec", tag = "1")]
pub endpoint_id: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "NodeRole", tag = "2")]
pub role: i32,
#[prost(uint32, optional, tag = "3")]
pub http_port: ::core::option::Option<u32>,
#[prost(string, optional, tag = "4")]
pub version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub gpu_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub hostname: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "7")]
pub is_soc: ::core::option::Option<bool>,
#[prost(string, optional, tag = "8")]
pub gpu_vram: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub available_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "10")]
pub serving_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "11")]
pub requested_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "12")]
pub available_model_metadata: ::prost::alloc::vec::Vec<CompactModelMetadata>,
#[prost(message, optional, tag = "13")]
pub experts_summary: ::core::option::Option<ExpertsSummary>,
#[prost(uint32, optional, tag = "14")]
pub rtt_ms: ::core::option::Option<u32>,
#[prost(string, repeated, tag = "15")]
pub catalog_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "16")]
pub vram_bytes: u64,
#[prost(string, optional, tag = "17")]
pub model_source: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "18")]
pub primary_serving: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "19")]
pub mesh_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "20")]
pub demand: ::prost::alloc::vec::Vec<ModelDemandEntry>,
#[prost(map = "string, uint64", tag = "21")]
pub available_model_sizes: ::std::collections::HashMap<::prost::alloc::string::String, u64>,
#[prost(bytes = "vec", tag = "22")]
pub serialized_addr: ::prost::alloc::vec::Vec<u8>,
#[prost(string, repeated, tag = "23")]
pub hosted_models: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, optional, tag = "24")]
pub hosted_models_known: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "25")]
pub served_model_descriptors: ::prost::alloc::vec::Vec<ServedModelDescriptor>,
#[prost(message, repeated, tag = "26")]
pub served_model_identities: ::prost::alloc::vec::Vec<ServedModelIdentity>,
#[prost(message, repeated, tag = "27")]
pub served_model_runtime: ::prost::alloc::vec::Vec<ModelRuntimeDescriptor>,
#[prost(message, optional, tag = "28")]
pub owner_attestation: ::core::option::Option<SignedNodeOwnership>,
#[prost(string, optional, tag = "29")]
pub gpu_mem_bandwidth_gbps: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "30")]
pub gpu_compute_tflops_fp32: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "31")]
pub gpu_compute_tflops_fp16: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "32")]
pub gpu_reserved_bytes: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "33")]
pub hardware: ::core::option::Option<HardwareInfo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HardwareInfo {
#[prost(bool, optional, tag = "1")]
pub is_soc: ::core::option::Option<bool>,
#[prost(string, optional, tag = "2")]
pub hostname: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub gpus: ::prost::alloc::vec::Vec<GpuInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GpuInfo {
#[prost(string, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub vram_bytes: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub reserved_bytes: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub mem_bandwidth_gbps: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub compute_tflops_fp32: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub compute_tflops_fp16: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SignedNodeOwnership {
#[prost(uint32, tag = "1")]
pub version: u32,
#[prost(string, tag = "2")]
pub cert_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub owner_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "4")]
pub owner_sign_public_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
pub node_endpoint_id: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "6")]
pub issued_at_unix_ms: u64,
#[prost(uint64, tag = "7")]
pub expires_at_unix_ms: u64,
#[prost(string, optional, tag = "8")]
pub node_label: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub hostname_hint: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bytes = "vec", tag = "10")]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServedModelDescriptor {
#[prost(message, optional, tag = "1")]
pub identity: ::core::option::Option<ServedModelIdentity>,
#[prost(message, optional, tag = "2")]
pub capabilities: ::core::option::Option<ModelCapabilities>,
#[prost(message, optional, tag = "3")]
pub topology: ::core::option::Option<ModelTopology>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ServedModelIdentity {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub is_primary: bool,
#[prost(enumeration = "ModelSourceKind", tag = "3")]
pub source_kind: i32,
#[prost(string, optional, tag = "4")]
pub canonical_ref: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub repository: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub revision: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub artifact: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub local_file_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub identity_hash: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelCapabilities {
#[prost(enumeration = "CapabilityLevel", tag = "1")]
pub vision: i32,
#[prost(enumeration = "CapabilityLevel", tag = "2")]
pub reasoning: i32,
#[prost(enumeration = "CapabilityLevel", tag = "3")]
pub tool_use: i32,
#[prost(bool, tag = "4")]
pub moe: bool,
#[prost(bool, tag = "5")]
pub multimodal: bool,
#[prost(enumeration = "CapabilityLevel", tag = "6")]
pub audio: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelTopology {
#[prost(message, optional, tag = "1")]
pub moe: ::core::option::Option<ModelMoeInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelRuntimeDescriptor {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub identity_hash: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, optional, tag = "3")]
pub context_length: ::core::option::Option<u32>,
#[prost(bool, tag = "4")]
pub ready: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelMoeInfo {
#[prost(uint32, tag = "1")]
pub expert_count: u32,
#[prost(uint32, tag = "2")]
pub used_expert_count: u32,
#[prost(uint32, optional, tag = "3")]
pub min_experts_per_node: ::core::option::Option<u32>,
#[prost(string, optional, tag = "4")]
pub source: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub ranking_source: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, repeated, tag = "6")]
pub ranking: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, optional, tag = "7")]
pub ranking_prompt_count: ::core::option::Option<u32>,
#[prost(uint32, optional, tag = "8")]
pub ranking_tokens: ::core::option::Option<u32>,
#[prost(string, optional, tag = "9")]
pub ranking_layer_scope: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub ranking_origin: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactModelMetadata {
#[prost(string, tag = "1")]
pub model_key: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub context_length: u32,
#[prost(uint32, tag = "3")]
pub vocab_size: u32,
#[prost(uint32, tag = "4")]
pub embedding_size: u32,
#[prost(uint32, tag = "5")]
pub head_count: u32,
#[prost(uint32, tag = "6")]
pub layer_count: u32,
#[prost(uint32, tag = "7")]
pub feed_forward_length: u32,
#[prost(uint32, tag = "8")]
pub key_length: u32,
#[prost(uint32, tag = "9")]
pub value_length: u32,
#[prost(string, tag = "10")]
pub architecture: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub tokenizer_model_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "12")]
pub special_tokens: ::prost::alloc::vec::Vec<SpecialToken>,
#[prost(float, tag = "13")]
pub rope_scale: f32,
#[prost(float, tag = "14")]
pub rope_freq_base: f32,
#[prost(bool, tag = "15")]
pub is_moe: bool,
#[prost(uint32, tag = "16")]
pub expert_count: u32,
#[prost(uint32, tag = "17")]
pub used_expert_count: u32,
#[prost(string, tag = "18")]
pub quantization_type: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SpecialToken {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub token_id: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExpertsSummary {
#[prost(uint32, tag = "1")]
pub total_experts: u32,
#[prost(uint32, tag = "2")]
pub expert_count_used: u32,
#[prost(uint32, repeated, tag = "3")]
pub top_expert_ids: ::prost::alloc::vec::Vec<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelDemandEntry {
#[prost(string, tag = "1")]
pub model_name: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub last_active: u64,
#[prost(uint64, tag = "3")]
pub request_count: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TunnelMap {
#[prost(bytes = "vec", tag = "1")]
pub owner_peer_id: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "2")]
pub entries: ::prost::alloc::vec::Vec<TunnelEntry>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TunnelEntry {
#[prost(bytes = "vec", tag = "1")]
pub target_peer_id: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", optional, tag = "2")]
pub relay_peer_id: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
#[prost(uint32, tag = "3")]
pub tunnel_port: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RouteTableRequest {
#[prost(bytes = "vec", tag = "1")]
pub requester_id: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub r#gen: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteTable {
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<RouteEntry>,
#[prost(string, optional, tag = "2")]
pub mesh_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, tag = "3")]
pub r#gen: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RouteEntry {
#[prost(bytes = "vec", tag = "1")]
pub endpoint_id: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub model: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PeerDown {
#[prost(bytes = "vec", tag = "1")]
pub peer_id: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub r#gen: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PeerLeaving {
#[prost(bytes = "vec", tag = "1")]
pub peer_id: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub r#gen: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeConfigSnapshot {
#[prost(uint32, tag = "1")]
pub version: u32,
#[prost(message, optional, tag = "2")]
pub gpu: ::core::option::Option<NodeGpuConfig>,
#[prost(message, repeated, tag = "3")]
pub models: ::prost::alloc::vec::Vec<NodeModelEntry>,
#[prost(message, repeated, tag = "4")]
pub plugins: ::prost::alloc::vec::Vec<NodePluginEntry>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeGpuConfig {
#[prost(enumeration = "GpuAssignment", tag = "1")]
pub assignment: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfiguredModelRef {
#[prost(string, tag = "1")]
pub declared_ref: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub source_kind: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub revision: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodeModelEntry {
#[prost(string, tag = "1")]
pub model: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub mmproj: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, optional, tag = "3")]
pub ctx_size: ::core::option::Option<u32>,
#[prost(string, optional, tag = "4")]
pub gpu_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub model_ref: ::core::option::Option<ConfiguredModelRef>,
#[prost(message, optional, tag = "6")]
pub mmproj_ref: ::core::option::Option<ConfiguredModelRef>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NodePluginEntry {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, optional, tag = "2")]
pub enabled: ::core::option::Option<bool>,
#[prost(string, optional, tag = "3")]
pub command: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigSubscribe {
#[prost(uint32, tag = "1")]
pub r#gen: u32,
#[prost(bytes = "vec", tag = "2")]
pub subscriber_id: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub owner_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSnapshotResponse {
#[prost(uint32, tag = "1")]
pub r#gen: u32,
#[prost(bytes = "vec", tag = "2")]
pub node_id: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub owner_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub revision: u64,
#[prost(bytes = "vec", tag = "5")]
pub config_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "6")]
pub config: ::core::option::Option<NodeConfigSnapshot>,
#[prost(string, optional, tag = "7")]
pub hostname: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "8")]
pub error: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigUpdateNotification {
#[prost(uint32, tag = "1")]
pub r#gen: u32,
#[prost(bytes = "vec", tag = "2")]
pub node_id: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "3")]
pub owner_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub revision: u64,
#[prost(bytes = "vec", tag = "5")]
pub config_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "6")]
pub config: ::core::option::Option<NodeConfigSnapshot>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigPush {
#[prost(uint32, tag = "1")]
pub r#gen: u32,
#[prost(bytes = "vec", tag = "2")]
pub requester_id: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub target_node_id: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "4")]
pub owner_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub expected_revision: u64,
#[prost(message, optional, tag = "6")]
pub config: ::core::option::Option<NodeConfigSnapshot>,
#[prost(bytes = "vec", tag = "7")]
pub owner_signing_public_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "8")]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigPushResponse {
#[prost(uint32, tag = "1")]
pub r#gen: u32,
#[prost(bool, tag = "2")]
pub success: bool,
#[prost(uint64, tag = "3")]
pub current_revision: u64,
#[prost(bytes = "vec", tag = "4")]
pub config_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(string, optional, tag = "5")]
pub error: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "ConfigApplyMode", tag = "8")]
pub apply_mode: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CapabilityLevel {
Unspecified = 0,
None = 1,
Likely = 2,
Supported = 3,
}
impl CapabilityLevel {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CAPABILITY_LEVEL_UNSPECIFIED",
Self::None => "CAPABILITY_LEVEL_NONE",
Self::Likely => "CAPABILITY_LEVEL_LIKELY",
Self::Supported => "CAPABILITY_LEVEL_SUPPORTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CAPABILITY_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
"CAPABILITY_LEVEL_NONE" => Some(Self::None),
"CAPABILITY_LEVEL_LIKELY" => Some(Self::Likely),
"CAPABILITY_LEVEL_SUPPORTED" => Some(Self::Supported),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ModelSourceKind {
Unspecified = 0,
Catalog = 1,
HuggingFace = 2,
LocalGguf = 3,
DirectUrl = 4,
Unknown = 5,
}
impl ModelSourceKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MODEL_SOURCE_KIND_UNSPECIFIED",
Self::Catalog => "MODEL_SOURCE_KIND_CATALOG",
Self::HuggingFace => "MODEL_SOURCE_KIND_HUGGING_FACE",
Self::LocalGguf => "MODEL_SOURCE_KIND_LOCAL_GGUF",
Self::DirectUrl => "MODEL_SOURCE_KIND_DIRECT_URL",
Self::Unknown => "MODEL_SOURCE_KIND_UNKNOWN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODEL_SOURCE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"MODEL_SOURCE_KIND_CATALOG" => Some(Self::Catalog),
"MODEL_SOURCE_KIND_HUGGING_FACE" => Some(Self::HuggingFace),
"MODEL_SOURCE_KIND_LOCAL_GGUF" => Some(Self::LocalGguf),
"MODEL_SOURCE_KIND_DIRECT_URL" => Some(Self::DirectUrl),
"MODEL_SOURCE_KIND_UNKNOWN" => Some(Self::Unknown),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NodeRole {
Unspecified = 0,
Worker = 1,
Host = 2,
Client = 3,
}
impl NodeRole {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "NODE_ROLE_UNSPECIFIED",
Self::Worker => "WORKER",
Self::Host => "HOST",
Self::Client => "CLIENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NODE_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
"WORKER" => Some(Self::Worker),
"HOST" => Some(Self::Host),
"CLIENT" => Some(Self::Client),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum GpuAssignment {
Unspecified = 0,
Auto = 1,
Pinned = 2,
}
impl GpuAssignment {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "GPU_ASSIGNMENT_UNSPECIFIED",
Self::Auto => "GPU_ASSIGNMENT_AUTO",
Self::Pinned => "GPU_ASSIGNMENT_PINNED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GPU_ASSIGNMENT_UNSPECIFIED" => Some(Self::Unspecified),
"GPU_ASSIGNMENT_AUTO" => Some(Self::Auto),
"GPU_ASSIGNMENT_PINNED" => Some(Self::Pinned),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigApplyMode {
Unspecified = 0,
Staged = 1,
Live = 2,
Noop = 3,
}
impl ConfigApplyMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONFIG_APPLY_MODE_UNSPECIFIED",
Self::Staged => "CONFIG_APPLY_MODE_STAGED",
Self::Live => "CONFIG_APPLY_MODE_LIVE",
Self::Noop => "CONFIG_APPLY_MODE_NOOP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONFIG_APPLY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"CONFIG_APPLY_MODE_STAGED" => Some(Self::Staged),
"CONFIG_APPLY_MODE_LIVE" => Some(Self::Live),
"CONFIG_APPLY_MODE_NOOP" => Some(Self::Noop),
_ => None,
}
}
}