model
ModuleWhat an orchestrator reports and is told: containers, networks, usage statistics, restart policies and how to run a container.
Contents
Structs
ContainerA container as a listing reports it.IoBytes in and out (read and written, received and sent).NetworkA network as a listing reports it.RunOptionsHow to run a container: everything but the image and the name, each empty or off by default.StatsA container's resource usage at one moment.use utopia_orchestration::Container;Rust
pub struct ContainerA container as a listing reports it.
use utopia_orchestration::Io;Rust
pub struct IoBytes in and out (read and written, received and sent).
use utopia_orchestration::Network;Rust
pub struct NetworkA network as a listing reports it.
use utopia_orchestration::RunOptions;Rust
pub struct RunOptionsHow to run a container: everything but the image and the name, each empty or off by default.
Rust
use utopia_orchestration::{Restart, RunOptions};
let options = RunOptions {
command: vec!["sh".into(), "-c".into(), "tail -f /dev/null".into()],
workdir: "/usr/local/src".into(),
vars: vec![("APP_ENV".into(), "production".into())],
labels: vec![("team".into(), "billing".into())],
restart: Restart::UnlessStopped,
..RunOptions::default()
};
assert_eq!(options.restart.as_str(), "unless-stopped");use utopia_orchestration::Stats;Rust
pub struct StatsA container's resource usage at one moment.
use utopia_orchestration::Restart;Rust
pub enum RestartWhen Docker restarts a container that stopped.
Also implements
From, Display.