rs-zero 0.1.1

Rust-first microservice framework inspired by go-zero engineering practices
Documentation
use std::collections::BTreeMap;

/// Kubernetes discovery adapter configuration.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct KubeDiscoveryConfig {
    /// Namespace to inspect.
    pub namespace: String,
    /// Optional label selector.
    pub label_selector: Option<String>,
    /// Optional port name.
    pub port_name: Option<String>,
    /// Metadata propagated to instances.
    pub metadata: BTreeMap<String, String>,
}

impl Default for KubeDiscoveryConfig {
    fn default() -> Self {
        Self {
            namespace: "default".to_string(),
            label_selector: None,
            port_name: None,
            metadata: BTreeMap::new(),
        }
    }
}