WorkloadProvider

Trait WorkloadProvider 

Source
pub trait WorkloadProvider {
    // Required methods
    fn get_tags_for_entity(
        &self,
        entity_id: &EntityId,
        cardinality: OriginTagCardinality,
    ) -> Option<SharedTagSet>;
    fn get_resolved_origin(
        &self,
        origin: RawOrigin<'_>,
    ) -> Option<ResolvedOrigin>;

    // Provided method
    fn get_self_container_tags(&self) -> Option<SharedTagSet> { ... }
}
Expand description

Provides information about workloads running on the process host.

Required Methods§

Source

fn get_tags_for_entity( &self, entity_id: &EntityId, cardinality: OriginTagCardinality, ) -> Option<SharedTagSet>

Gets the tags for an entity.

Entities are workload resources running on the process host, such as containers or pods. The cardinality of the tags to get can be controlled via cardinality.

Returns Some(SharedTagSet) if the entity has tags, or None if the entity doesn’t have any tags or if the entity wasn’t found.

Source

fn get_resolved_origin(&self, origin: RawOrigin<'_>) -> Option<ResolvedOrigin>

Resolves a raw origin.

If the origin is empty, None is returned. Otherwise, Some(ResolvedOrigin) will be returned, which contains fully resolved versions of the raw origin components.

Provided Methods§

Source

fn get_self_container_tags(&self) -> Option<SharedTagSet>

Gets low-cardinality tags for the container that runs this process.

Providers that cannot determine the process container return None.

Implementations on Foreign Types§

Source§

impl<T> WorkloadProvider for Option<T>

Source§

fn get_tags_for_entity( &self, entity_id: &EntityId, cardinality: OriginTagCardinality, ) -> Option<SharedTagSet>

Source§

fn get_self_container_tags(&self) -> Option<SharedTagSet>

Source§

fn get_resolved_origin(&self, origin: RawOrigin<'_>) -> Option<ResolvedOrigin>

Implementors§