Container

Struct Container 

Source
pub struct Container { /* private fields */ }
Expand description

Container fields are used for meta information about the specific container that is the source of information.

These fields help correlate data based containers from any runtime.

Implementations§

Source§

impl Container

Source

pub fn get_cpu_usage(&self) -> Option<&String>

Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1. Scaling factor: 1000.

Source

pub fn set_cpu_usage(&mut self, cpu_usage_arg: String)

Percent CPU used which is normalized by the number of CPU cores and it ranges from 0 to 1. Scaling factor: 1000.

Source

pub fn get_disk_read_bytes(&self) -> Option<&u64>

The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection.

Source

pub fn set_disk_read_bytes(&mut self, disk_read_bytes_arg: u64)

The total number of bytes (gauge) read successfully (aggregated from all disks) since the last metric collection.

Source

pub fn get_disk_write_bytes(&self) -> Option<&u64>

The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection.

Source

pub fn set_disk_write_bytes(&mut self, disk_write_bytes_arg: u64)

The total number of bytes (gauge) written successfully (aggregated from all disks) since the last metric collection.

Source

pub fn get_id(&self) -> Option<&String>

Unique container id.

Source

pub fn set_id(&mut self, id_arg: String)

Unique container id.

Source

pub fn get_image_name(&self) -> Option<&String>

Name of the image the container was built on.

Source

pub fn set_image_name(&mut self, image_name_arg: String)

Name of the image the container was built on.

Source

pub fn get_image_tag(&self) -> &Vec<String>

Container image tags.

Source

pub fn add_image_tag(&mut self, image_tag_arg: String)

Container image tags.

Source

pub fn get_image_hash_all(&self) -> &Vec<String>

An array of digests of the image the container was built on. Each digest consists of the hash algorithm and value in this format: algorithm:value. Algorithm names should align with the field names in the ECS hash field set.

Source

pub fn add_image_hash_all(&mut self, image_hash_all_arg: String)

An array of digests of the image the container was built on. Each digest consists of the hash algorithm and value in this format: algorithm:value. Algorithm names should align with the field names in the ECS hash field set.

§Example

[sha256:f8fefc80e3273dc756f288a63945820d6476ad64883892c771b5e2ece6bf1b26]

Source

pub fn get_labels(&self) -> Option<&Value>

Image labels.

Source

pub fn set_labels(&mut self, labels_arg: Value)

Image labels.

Source

pub fn get_memory_usage(&self) -> Option<&String>

Memory usage percentage and it ranges from 0 to 1. Scaling factor: 1000.

Source

pub fn set_memory_usage(&mut self, memory_usage_arg: String)

Memory usage percentage and it ranges from 0 to 1. Scaling factor: 1000.

Source

pub fn get_name(&self) -> Option<&String>

Container name.

Source

pub fn set_name(&mut self, name_arg: String)

Container name.

Source

pub fn get_network_ingress_bytes(&self) -> Option<&u64>

The number of bytes received (gauge) on all network interfaces by the container since the last metric collection.

Source

pub fn set_network_ingress_bytes(&mut self, network_ingress_bytes_arg: u64)

The number of bytes received (gauge) on all network interfaces by the container since the last metric collection.

Source

pub fn get_network_egress_bytes(&self) -> Option<&u64>

The number of bytes (gauge) sent out on all network interfaces by the container since the last metric collection.

Source

pub fn set_network_egress_bytes(&mut self, network_egress_bytes_arg: u64)

The number of bytes (gauge) sent out on all network interfaces by the container since the last metric collection.

Source

pub fn get_runtime(&self) -> Option<&String>

Runtime managing this container.

Source

pub fn set_runtime(&mut self, runtime_arg: String)

Runtime managing this container.

§Example

docker

Trait Implementations§

Source§

impl Clone for Container

Source§

fn clone(&self) -> Container

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Container

Source§

fn default() -> Container

Returns the “default value” for a type. Read more
Source§

impl Serialize for Container

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.