podman_rest_client/v5/models/linux_memory.rs
1use serde::{Deserialize, Serialize};
2#[derive(Default, Debug, Serialize, Deserialize)]
3/// LinuxMemory for Linux cgroup 'memory' resource management
4pub struct LinuxMemory {
5 /// CheckBeforeUpdate enables checking if a new memory limit is lower
6 /// than the current usage during update, and if so, rejecting the new
7 /// limit.
8 #[serde(rename = "checkBeforeUpdate")]
9 pub check_before_update: Option<bool>,
10 /// DisableOOMKiller disables the OOM killer for out of memory conditions
11 #[serde(rename = "disableOOMKiller")]
12 pub disable_oom_killer: Option<bool>,
13 /// Kernel memory limit (in bytes).
14 ///
15 /// Deprecated: kernel-memory limits are not supported in cgroups v2, and
16 /// were obsoleted in [kernel v5.4]. This field should no longer be used,
17 /// as it may be ignored by runtimes.
18 ///
19 /// [kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0
20 pub kernel: Option<i64>,
21 /// Kernel memory limit for tcp (in bytes)
22 #[serde(rename = "kernelTCP")]
23 pub kernel_tcp: Option<i64>,
24 /// Memory limit (in bytes).
25 pub limit: Option<i64>,
26 /// Memory reservation or soft_limit (in bytes).
27 pub reservation: Option<i64>,
28 /// Total memory limit (memory + swap).
29 pub swap: Option<i64>,
30 /// How aggressive the kernel will swap memory pages.
31 pub swappiness: Option<u64>,
32 /// Enables hierarchical memory accounting
33 #[serde(rename = "useHierarchy")]
34 pub use_hierarchy: Option<bool>,
35}