Struct bollard::container::UpdateContainerOptions
source · pub struct UpdateContainerOptions<T>{Show 33 fields
pub cpu_shares: Option<isize>,
pub memory: Option<i64>,
pub cgroup_parent: Option<T>,
pub blkio_weight: Option<u16>,
pub blkio_weight_device: Option<Vec<ResourcesBlkioWeightDevice>>,
pub blkio_device_read_bps: Option<Vec<ThrottleDevice>>,
pub blkio_device_write_bps: Option<Vec<ThrottleDevice>>,
pub blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>,
pub blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>,
pub cpu_period: Option<i64>,
pub cpu_quota: Option<i64>,
pub cpu_realtime_period: Option<i64>,
pub cpu_realtime_runtime: Option<i64>,
pub cpuset_cpus: Option<T>,
pub cpuset_mems: Option<T>,
pub devices: Option<Vec<DeviceMapping>>,
pub device_cgroup_rules: Option<Vec<T>>,
pub device_requests: Option<Vec<DeviceRequest>>,
pub kernel_memory: Option<i64>,
pub kernel_memory_tcp: Option<i64>,
pub memory_reservation: Option<i64>,
pub memory_swap: Option<i64>,
pub memory_swappiness: Option<i64>,
pub nano_cp_us: Option<i64>,
pub oom_kill_disable: Option<bool>,
pub init: Option<bool>,
pub pids_limit: Option<i64>,
pub ulimits: Option<Vec<ResourcesUlimits>>,
pub cpu_count: Option<i64>,
pub cpu_percent: Option<i64>,
pub io_maximum_i_ops: Option<i64>,
pub io_maximum_bandwidth: Option<i64>,
pub restart_policy: Option<RestartPolicy>,
}
Expand description
Configuration for the Update Container API
§Examples
use bollard::container::UpdateContainerOptions;
use std::default::Default;
UpdateContainerOptions::<String> {
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<i64>
Memory limit in bytes.
cgroup_parent: Option<T>
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<u16>
Block IO weight (relative weight).
blkio_weight_device: Option<Vec<ResourcesBlkioWeightDevice>>
Block IO weight (relative device weight) in the form [{\"Path\": \"device_path\", \"Weight\": weight}]
.
blkio_device_read_bps: Option<Vec<ThrottleDevice>>
Limit read rate (bytes per second) from a device, in the form [{\"Path\": \"device_path\", \"Rate\": rate}]
.
blkio_device_write_bps: Option<Vec<ThrottleDevice>>
Limit write rate (bytes per second) to a device, in the form [{\"Path\": \"device_path\", \"Rate\": rate}]
.
blkio_device_read_i_ops: Option<Vec<ThrottleDevice>>
Limit read rate (IO per second) from a device, in the form [{\"Path\": \"device_path\", \"Rate\": rate}]
.
blkio_device_write_i_ops: Option<Vec<ThrottleDevice>>
Limit write rate (IO per second) to a device, in the form [{\"Path\": \"device_path\", \"Rate\": rate}]
.
cpu_period: Option<i64>
The length of a CPU period in microseconds.
cpu_quota: Option<i64>
Microseconds of CPU time that the container can get in a CPU period.
cpu_realtime_period: Option<i64>
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<i64>
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<T>
CPUs in which to allow execution (e.g., 0-3
, 0,1
)
cpuset_mems: Option<T>
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
devices: Option<Vec<DeviceMapping>>
A list of devices to add to the container.
device_cgroup_rules: Option<Vec<T>>
a list of cgroup rules to apply to the container
device_requests: Option<Vec<DeviceRequest>>
a list of requests for devices to be sent to device drivers
kernel_memory: Option<i64>
Kernel memory limit in bytes.
kernel_memory_tcp: Option<i64>
Hard limit for kernel TCP buffer memory (in bytes).
memory_reservation: Option<i64>
Memory soft limit in bytes.
memory_swap: Option<i64>
Total memory limit (memory + swap). Set as -1
to enable unlimited swap.
memory_swappiness: Option<i64>
Tune a container’s memory swappiness behavior. Accepts an integer between 0 and 100.
nano_cp_us: Option<i64>
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<i64>
Tune a container’s PIDs limit. Set 0
or -1
for unlimited, or null
to not change.
ulimits: Option<Vec<ResourcesUlimits>>
A list of resource limits to set in the container. For example: {\"Name\": \"nofile\", \"Soft\": 1024, \"Hard\": 2048}
"
cpu_count: Option<i64>
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<i64>
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_i_ops: Option<i64>
Maximum IOps for the container system drive (Windows only)
io_maximum_bandwidth: Option<i64>
Maximum IO in bytes per second for the container system drive (Windows only)
restart_policy: Option<RestartPolicy>
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<T> Clone for UpdateContainerOptions<T>
impl<T> Clone for UpdateContainerOptions<T>
source§fn clone(&self) -> UpdateContainerOptions<T>
fn clone(&self) -> UpdateContainerOptions<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T> Debug for UpdateContainerOptions<T>
impl<T> Debug for UpdateContainerOptions<T>
source§impl<T> Default for UpdateContainerOptions<T>
impl<T> Default for UpdateContainerOptions<T>
source§fn default() -> UpdateContainerOptions<T>
fn default() -> UpdateContainerOptions<T>
source§impl<T> PartialEq for UpdateContainerOptions<T>
impl<T> PartialEq for UpdateContainerOptions<T>
source§impl<T> Serialize for UpdateContainerOptions<T>
impl<T> Serialize for UpdateContainerOptions<T>
impl<T> StructuralPartialEq for UpdateContainerOptions<T>
Auto Trait Implementations§
impl<T> Freeze for UpdateContainerOptions<T>where
T: Freeze,
impl<T> RefUnwindSafe for UpdateContainerOptions<T>where
T: RefUnwindSafe,
impl<T> Send for UpdateContainerOptions<T>where
T: Send,
impl<T> Sync for UpdateContainerOptions<T>where
T: Sync,
impl<T> Unpin for UpdateContainerOptions<T>where
T: Unpin,
impl<T> UnwindSafe for UpdateContainerOptions<T>where
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)