Struct bollard::container::UpdateContainerOptions
source · pub struct UpdateContainerOptions {Show 31 fields
pub cpu_shares: Option<isize>,
pub memory: Option<u64>,
pub cgroup_parent: Option<String>,
pub blkio_weight: Option<isize>,
pub blkio_weight_device: Vec<UpdateContainerOptionsBlkioWeight>,
pub blkio_device_read_bps: Vec<UpdateContainerOptionsBlkioDeviceRate>,
pub blkio_device_write_iops: Vec<UpdateContainerOptionsBlkioDeviceRate>,
pub blkio_device_read_iops: Vec<UpdateContainerOptionsBlkioDeviceRate>,
pub cpu_period: Option<u64>,
pub cpu_quota: Option<u64>,
pub cpu_realtime_period: Option<u64>,
pub cpu_realtime_runtime: Option<u64>,
pub cpuset_cpus: Option<String>,
pub cpuset_mems: Option<String>,
pub devices: Option<Vec<UpdateContainerOptionsDevices>>,
pub device_cgroup_rules: Option<Vec<String>>,
pub disk_quota: Option<u64>,
pub kernel_memory: Option<u64>,
pub memory_reservation: Option<u64>,
pub memory_swap: Option<i64>,
pub memory_swappiness: Option<u64>,
pub nano_cpus: Option<u64>,
pub oom_kill_disable: Option<bool>,
pub init: Option<bool>,
pub pids_limit: Option<u64>,
pub ulimits: Vec<UpdateContainerOptionsUlimits>,
pub cpu_count: Option<u64>,
pub cpu_percent: Option<u64>,
pub io_maximum_iops: Option<u64>,
pub io_maximum_bandwidth: Option<u64>,
pub restart_policy: Option<UpdateContainerOptionsRestartPolicy>,
}
Expand description
Configuration for the Update Container API
Examples
use bollard::container::UpdateContainerOptions;
use std::default::Default;
UpdateContainerOptions {
memory: Some(314572800),
memory_swap: Some(314572800),
..Default::default()
};
Fields§
An integer value representing this container’s relative CPU weight versus other containers.
memory: Option<u64>
Memory limit in bytes.
cgroup_parent: Option<String>
Path to cgroups
under which the container’s cgroup
is created. If the path is not absolute,
the path is considered to be relative to the cgroups
path of the init process. Cgroups are
created if they do not already exist.
blkio_weight: Option<isize>
Block IO weight (relative weight).
blkio_weight_device: Vec<UpdateContainerOptionsBlkioWeight>
Block IO weight (relative device weight).
blkio_device_read_bps: Vec<UpdateContainerOptionsBlkioDeviceRate>
Limit read rate (bytes per second) from a device.
blkio_device_write_iops: Vec<UpdateContainerOptionsBlkioDeviceRate>
Limit write rate (bytes per second) to a device.
blkio_device_read_iops: Vec<UpdateContainerOptionsBlkioDeviceRate>
Limit read rate (IO per second) from a device.
cpu_period: Option<u64>
The length of a CPU period in microseconds.
cpu_quota: Option<u64>
Microseconds of CPU time that the container can get in a CPU period.
cpu_realtime_period: Option<u64>
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
cpu_realtime_runtime: Option<u64>
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks.
cpuset_cpus: Option<String>
CPUs in which to allow execution (e.g., 0-3
, 0,1
)
cpuset_mems: Option<String>
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
devices: Option<Vec<UpdateContainerOptionsDevices>>
A list of devices to add to the container.
device_cgroup_rules: Option<Vec<String>>
A list of cgroup rules to apply to the container.
disk_quota: Option<u64>
Disk limit (in bytes).
kernel_memory: Option<u64>
Kernel memory limit in bytes.
memory_reservation: Option<u64>
Memory soft limit in bytes.
memory_swap: Option<i64>
Total memory limit (memory + swap). Set as -1
to enable unlimited swap.
memory_swappiness: Option<u64>
Tune a container’s memory swappiness behavior. Accepts an integer between 0 and 100.
nano_cpus: Option<u64>
CPU quota in units of 10-9 CPUs.
oom_kill_disable: Option<bool>
Disable OOM Killer for the container.
init: Option<bool>
Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used.
pids_limit: Option<u64>
Tune a container’s pids limit. Set -1 for unlimited.
ulimits: Vec<UpdateContainerOptionsUlimits>
A list of resource limits to set in the container.
cpu_count: Option<u64>
The number of usable CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The
order of precedence is CPUCount
first, then CPUShares
, and CPUPercent
last.
cpu_percent: Option<u64>
The usable percentage of the available CPUs (Windows only).
On Windows Server containers, the processor resource controls are mutually exclusive. The
order of precedence is CPUCount
first, then CPUShares
, and CPUPercent
last.
io_maximum_iops: Option<u64>
Maximum IOps for the container system drive (Windows only).
io_maximum_bandwidth: Option<u64>
Maximum IO in bytes per second for the container system drive (Windows only).
restart_policy: Option<UpdateContainerOptionsRestartPolicy>
The behavior to apply when the container exits. The default is not to restart.
An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
Trait Implementations§
source§impl Clone for UpdateContainerOptions
impl Clone for UpdateContainerOptions
source§fn clone(&self) -> UpdateContainerOptions
fn clone(&self) -> UpdateContainerOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more