Struct cgroups_rs::BlkIoResources
source · pub struct BlkIoResources {
pub weight: Option<u16>,
pub leaf_weight: Option<u16>,
pub weight_device: Vec<BlkIoDeviceResource>,
pub throttle_read_bps_device: Vec<BlkIoDeviceThrottleResource>,
pub throttle_read_iops_device: Vec<BlkIoDeviceThrottleResource>,
pub throttle_write_bps_device: Vec<BlkIoDeviceThrottleResource>,
pub throttle_write_iops_device: Vec<BlkIoDeviceThrottleResource>,
pub attrs: HashMap<String, String>,
}Expand description
General block I/O resource limits.
Fields§
§weight: Option<u16>The weight of the control group against descendant nodes.
leaf_weight: Option<u16>The weight of the control group against sibling nodes.
weight_device: Vec<BlkIoDeviceResource>For each device, a separate weight (both normal and leaf) can be provided.
throttle_read_bps_device: Vec<BlkIoDeviceThrottleResource>Throttled read bytes/second can be provided for each device.
throttle_read_iops_device: Vec<BlkIoDeviceThrottleResource>Throttled read IO operations per second can be provided for each device.
throttle_write_bps_device: Vec<BlkIoDeviceThrottleResource>Throttled written bytes/second can be provided for each device.
throttle_write_iops_device: Vec<BlkIoDeviceThrottleResource>Throttled write IO operations per second can be provided for each device.
attrs: HashMap<String, String>Customized key-value attributes
Usage:
let resource = &mut cgroups_rs::Resources::default();
resource.blkio.attrs.insert("io.cost.weight".to_string(), "10".to_string());
// apply hereTrait Implementations§
source§impl Clone for BlkIoResources
impl Clone for BlkIoResources
source§fn clone(&self) -> BlkIoResources
fn clone(&self) -> BlkIoResources
Returns a copy 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 BlkIoResources
impl Debug for BlkIoResources
source§impl Default for BlkIoResources
impl Default for BlkIoResources
source§fn default() -> BlkIoResources
fn default() -> BlkIoResources
Returns the “default value” for a type. Read more
source§impl PartialEq<BlkIoResources> for BlkIoResources
impl PartialEq<BlkIoResources> for BlkIoResources
source§fn eq(&self, other: &BlkIoResources) -> bool
fn eq(&self, other: &BlkIoResources) -> bool
This method tests for
self and other values to be equal, and is used
by ==.