pub struct LinuxContainerResources {
pub cpu_period: i64,
pub cpu_quota: i64,
pub cpu_shares: i64,
pub memory_limit_in_bytes: i64,
pub oom_score_adj: i64,
pub cpuset_cpus: String,
pub cpuset_mems: String,
pub hugepage_limits: Vec<HugepageLimit>,
pub unified: HashMap<String, String>,
pub memory_swap_limit_in_bytes: i64,
}Expand description
LinuxContainerResources specifies Linux specific configuration for resources.
Fields§
§cpu_period: i64CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified).
cpu_quota: i64CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified).
CPU shares (relative weight vs. other containers). Default: 0 (not specified).
memory_limit_in_bytes: i64Memory limit in bytes. Default: 0 (not specified).
oom_score_adj: i64OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified).
cpuset_cpus: StringCpusetCpus constrains the allowed set of logical CPUs. Default: “” (not specified).
cpuset_mems: StringCpusetMems constrains the allowed set of memory nodes. Default: “” (not specified).
hugepage_limits: Vec<HugepageLimit>List of HugepageLimits to limit the HugeTLB usage of container per page size. Default: nil (not specified).
unified: HashMap<String, String>Unified resources for cgroup v2. Default: nil (not specified). Each key/value in the map refers to the cgroup v2. e.g. “memory.max”: “6937202688” or “io.weight”: “default 100”.
memory_swap_limit_in_bytes: i64Memory swap limit in bytes. Default 0 (not specified).
Trait Implementations§
Source§impl Clone for LinuxContainerResources
impl Clone for LinuxContainerResources
Source§fn clone(&self) -> LinuxContainerResources
fn clone(&self) -> LinuxContainerResources
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinuxContainerResources
impl Debug for LinuxContainerResources
Source§impl Default for LinuxContainerResources
impl Default for LinuxContainerResources
Source§impl<'de> Deserialize<'de> for LinuxContainerResources
impl<'de> Deserialize<'de> for LinuxContainerResources
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for LinuxContainerResources
impl Message for LinuxContainerResources
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for LinuxContainerResources
impl PartialEq for LinuxContainerResources
Source§impl Serialize for LinuxContainerResources
impl Serialize for LinuxContainerResources
impl StructuralPartialEq for LinuxContainerResources
Auto Trait Implementations§
impl Freeze for LinuxContainerResources
impl RefUnwindSafe for LinuxContainerResources
impl Send for LinuxContainerResources
impl Sync for LinuxContainerResources
impl Unpin for LinuxContainerResources
impl UnwindSafe for LinuxContainerResources
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request