pub struct ServiceDef {Show 22 fields
pub rootfs: String,
pub command: Vec<String>,
pub memory: String,
pub cpus: f64,
pub pids: u64,
pub networks: Vec<String>,
pub volumes: Vec<String>,
pub depends_on: Vec<DependsOn>,
pub health_check: Option<String>,
pub health_interval: u64,
pub egress_allow: Vec<String>,
pub egress_tcp_ports: Vec<u16>,
pub port_forwards: Vec<String>,
pub environment: BTreeMap<String, String>,
pub user: Option<String>,
pub group: Option<String>,
pub additional_groups: Vec<String>,
pub secrets: Vec<String>,
pub dns: Vec<String>,
pub replicas: u32,
pub runtime: String,
pub hooks: Option<OciHooks>,
}Expand description
Service (container) definition within a topology.
Fields§
§rootfs: StringNix store path to rootfs derivation
command: Vec<String>Command to run
memory: StringMemory limit (e.g. “512M”, “2G”)
cpus: f64CPU core limit
pids: u64PID limit
networks: Vec<String>Networks this service connects to
volumes: Vec<String>Volume mounts (format: “volume-name:/mount/path”)
depends_on: Vec<DependsOn>Services this depends on, with optional health condition
health_check: Option<String>Health check command
health_interval: u64Health check interval in seconds
egress_allow: Vec<String>Allowed egress CIDRs
egress_tcp_ports: Vec<u16>Allowed egress TCP ports
port_forwards: Vec<String>Port forwards (format: “HOST:CONTAINER” or “HOST_IP:HOST:CONTAINER”)
environment: BTreeMap<String, String>Environment variables
user: Option<String>Workload user name or numeric uid.
group: Option<String>Workload group name or numeric gid.
additional_groups: Vec<String>Supplementary workload groups (names or numeric gids).
secrets: Vec<String>Secret mounts (format: “source:dest”)
dns: Vec<String>DNS servers
replicas: u32Number of replicas for scaling
runtime: StringContainer runtime
hooks: Option<OciHooks>OCI lifecycle hooks
Trait Implementations§
Source§impl Clone for ServiceDef
impl Clone for ServiceDef
Source§fn clone(&self) -> ServiceDef
fn clone(&self) -> ServiceDef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceDef
impl Debug for ServiceDef
Source§impl<'de> Deserialize<'de> for ServiceDef
impl<'de> Deserialize<'de> for ServiceDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ServiceDef
impl RefUnwindSafe for ServiceDef
impl Send for ServiceDef
impl Sync for ServiceDef
impl Unpin for ServiceDef
impl UnsafeUnpin for ServiceDef
impl UnwindSafe for ServiceDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more