use lazy_static::lazy_static;
use serde_derive::{Deserialize, Serialize};
pub type ProxyMode = String;
lazy_static!(
pub static ref PROXY_MODE_DEFAULT: ProxyMode = {
String::new()
};
pub static ref PROXY_MODE_TRANSPARENT: ProxyMode = {
String::from("transparent")
};
pub static ref PROXY_MODE_DIRECT: ProxyMode = {
String::from("direct")
};
);
pub type MeshGatewayMode = String;
lazy_static!(
pub static ref MESH_GATEWAY_MODE_DEFAULT: MeshGatewayMode = {
String::new()
};
pub static ref MESH_GATEWAY_MODE_NONE: MeshGatewayMode = {
String::from("none")
};
pub static ref MESH_GATEWAY_MODE_LOCAL: MeshGatewayMode = {
String::from("local")
};
pub static ref MESH_GATEWAY_MODE_REMOTE: MeshGatewayMode = {
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>,
}