use lazy_static::lazy_static;
use async_std::sync::Arc;
use serde_derive::{Serialize, Deserialize};
pub type ProxyMode = String;
lazy_static!(
pub static ref PROXY_MODE_DEFAULT: Arc<ProxyMode> = {
Arc::new(String::new())
};
pub static ref PROXY_MODE_TRANSPARENT: Arc<ProxyMode> = {
Arc::new(String::from("transparent"))
};
pub static ref PROXY_MODE_DIRECT: Arc<ProxyMode> = {
Arc::new(String::from("direct"))
};
);
pub type MeshGatewayMode = String;
lazy_static!(
pub static ref MESH_GATEWAY_MODE_DEFAULT: Arc<MeshGatewayMode> = {
Arc::new(String::new())
};
pub static ref MESH_GATEWAY_MODE_NONE: Arc<MeshGatewayMode> = {
Arc::new(String::from("none"))
};
pub static ref MESH_GATEWAY_MODE_LOCAL: Arc<MeshGatewayMode> = {
Arc::new(String::from("local"))
};
pub static ref MESH_GATEWAY_MODE_REMOTE: Arc<MeshGatewayMode> = {
Arc::new(String::from("remote"))
};
);
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
#[allow(non_snake_case)]
pub struct MeshGatewayConfig {
pub Mode: Option<MeshGatewayMode>,
}
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
#[allow(non_snake_case)]
pub struct ExposeConfig {
pub Checks: Option<bool>,
pub Paths: Option<Vec<ExposePath>>,
}
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
#[allow(non_snake_case)]
pub struct ExposePath {
pub ListenerPort: Option<usize>,
pub Path: Option<String>,
pub LocalPathPort: Option<usize>,
pub Protocol: Option<String>,
pub ParsedFromCheck: Option<bool>,
}