From f8462e334586e3ecc632810861f1cf289af360fc Mon Sep 17 00:00:00 2001 From: Yashodhan Joshi Date: Mon, 29 Apr 2024 15:30:20 +0530 Subject: [PATCH] Add missing getset to LinuxMemory struct members Signed-off-by: Yashodhan Joshi --- src/runtime/linux.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/runtime/linux.rs b/src/runtime/linux.rs index 21b4f7e1fa..fdb37fc2c3 100644 --- a/src/runtime/linux.rs +++ b/src/runtime/linux.rs @@ -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, #[serde(skip_serializing_if = "Option::is_none")] + #[getset(get_copy = "pub", set = "pub")] /// Memory reservation or soft_limit (in bytes). reservation: Option, #[serde(skip_serializing_if = "Option::is_none")] + #[getset(get_copy = "pub", set = "pub")] /// Total memory limit (memory + swap). swap: Option, #[serde(skip_serializing_if = "Option::is_none")] + #[getset(get_copy = "pub", set = "pub")] /// Kernel memory limit (in bytes). kernel: Option, #[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, #[serde(skip_serializing_if = "Option::is_none")] + #[getset(get_copy = "pub", set = "pub")] /// How aggressive the kernel will swap memory pages. swappiness: Option, #[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, #[serde(skip_serializing_if = "Option::is_none")] + #[getset(get_copy = "pub", set = "pub")] /// Enables hierarchical memory accounting use_hierarchy: Option, #[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, }