#[repr(i32)]pub enum NamespaceMode {
Pod = 0,
Container = 1,
Node = 2,
Target = 3,
}Expand description
A NamespaceMode describes the intended namespace configuration for each of the namespaces (Network, PID, IPC) in NamespaceOption. Runtimes should map these modes as appropriate for the technology underlying the runtime.
Variants§
Pod = 0
A POD namespace is common to all containers in a pod. For example, a container with a PID namespace of POD expects to view all of the processes in all of the containers in the pod.
Container = 1
A CONTAINER namespace is restricted to a single container. For example, a container with a PID namespace of CONTAINER expects to view only the processes in that container.
Node = 2
A NODE namespace is the namespace of the Kubernetes node. For example, a container with a PID namespace of NODE expects to view all of the processes on the host running the kubelet.
Target = 3
TARGET targets the namespace of another container. When this is specified, a target_id must be specified in NamespaceOption and refer to a container previously created with NamespaceMode CONTAINER. This containers namespace will be made to match that of container target_id. For example, a container with a PID namespace of TARGET expects to view all of the processes that container target_id can view.
Implementations§
Source§impl NamespaceMode
impl NamespaceMode
Source§impl NamespaceMode
impl NamespaceMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for NamespaceMode
impl Clone for NamespaceMode
Source§fn clone(&self) -> NamespaceMode
fn clone(&self) -> NamespaceMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NamespaceMode
impl Debug for NamespaceMode
Source§impl Default for NamespaceMode
impl Default for NamespaceMode
Source§fn default() -> NamespaceMode
fn default() -> NamespaceMode
Source§impl<'de> Deserialize<'de> for NamespaceMode
impl<'de> Deserialize<'de> for NamespaceMode
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 From<NamespaceMode> for i32
impl From<NamespaceMode> for i32
Source§fn from(value: NamespaceMode) -> i32
fn from(value: NamespaceMode) -> i32
Source§impl Hash for NamespaceMode
impl Hash for NamespaceMode
Source§impl Ord for NamespaceMode
impl Ord for NamespaceMode
Source§fn cmp(&self, other: &NamespaceMode) -> Ordering
fn cmp(&self, other: &NamespaceMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NamespaceMode
impl PartialEq for NamespaceMode
Source§impl PartialOrd for NamespaceMode
impl PartialOrd for NamespaceMode
Source§impl Serialize for NamespaceMode
impl Serialize for NamespaceMode
Source§impl TryFrom<i32> for NamespaceMode
impl TryFrom<i32> for NamespaceMode
Source§type Error = DecodeError
type Error = DecodeError
Source§fn try_from(value: i32) -> Result<NamespaceMode, DecodeError>
fn try_from(value: i32) -> Result<NamespaceMode, DecodeError>
impl Copy for NamespaceMode
impl Eq for NamespaceMode
impl StructuralPartialEq for NamespaceMode
Auto Trait Implementations§
impl Freeze for NamespaceMode
impl RefUnwindSafe for NamespaceMode
impl Send for NamespaceMode
impl Sync for NamespaceMode
impl Unpin for NamespaceMode
impl UnwindSafe for NamespaceMode
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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