pub enum InstanceIdSource {
AwsInstanceId,
GcpInstanceId,
AzureInstanceId,
KubernetesPodUid,
DockerContainerId,
CustomFile(PathBuf),
CustomEnvVar(String),
}Expand description
Source for obtaining a stable instance identifier in cloud/container environments
Variants§
AwsInstanceId
AWS EC2 instance ID from IMDS
GcpInstanceId
GCP instance ID from metadata server
AzureInstanceId
Azure instance ID from IMDS
KubernetesPodUid
Kubernetes pod UID from downward API
DockerContainerId
Docker container ID from cgroup
CustomFile(PathBuf)
Read from a file (e.g., mounted secret or config)
CustomEnvVar(String)
Read from an environment variable
Implementations§
Trait Implementations§
Source§impl Clone for InstanceIdSource
impl Clone for InstanceIdSource
Source§fn clone(&self) -> InstanceIdSource
fn clone(&self) -> InstanceIdSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InstanceIdSource
impl Debug for InstanceIdSource
Source§impl<'de> Deserialize<'de> for InstanceIdSource
impl<'de> Deserialize<'de> for InstanceIdSource
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for InstanceIdSource
impl RefUnwindSafe for InstanceIdSource
impl Send for InstanceIdSource
impl Sync for InstanceIdSource
impl Unpin for InstanceIdSource
impl UnsafeUnpin for InstanceIdSource
impl UnwindSafe for InstanceIdSource
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
Mutably borrows from an owned value. Read more