Skip to content

Commit

Permalink
Merge pull request #164 from YJDoc2/fix/get_set
Browse files Browse the repository at this point in the history
Add missing getset to LinuxMemory struct members
  • Loading branch information
utam0k authored May 1, 2024
2 parents 593def8 + f8462e3 commit 4cf1c3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/runtime/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,39 +314,48 @@ impl ToString for LinuxDeviceCgroup {
/// LinuxMemory for Linux cgroup 'memory' resource management.
pub struct LinuxMemory {
#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// Memory limit (in bytes).
limit: Option<i64>,

#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// Memory reservation or soft_limit (in bytes).
reservation: Option<i64>,

#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// Total memory limit (memory + swap).
swap: Option<i64>,

#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// Kernel memory limit (in bytes).
kernel: Option<i64>,

#[serde(skip_serializing_if = "Option::is_none", rename = "kernelTCP")]
#[getset(get_copy = "pub", set = "pub")]
/// Kernel memory limit for tcp (in bytes).
kernel_tcp: Option<i64>,

#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// How aggressive the kernel will swap memory pages.
swappiness: Option<u64>,

#[serde(skip_serializing_if = "Option::is_none", rename = "disableOOMKiller")]
#[getset(get_copy = "pub", set = "pub")]
/// DisableOOMKiller disables the OOM killer for out of memory
/// conditions.
disable_oom_killer: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// Enables hierarchical memory accounting
use_hierarchy: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get_copy = "pub", set = "pub")]
/// Enables checking if a new memory limit is lower
check_before_update: Option<bool>,
}
Expand Down

0 comments on commit 4cf1c3d

Please sign in to comment.