Skip to main content

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>;
}
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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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_resolved_origin(&self, origin: RawOrigin<'_>) -> Option<ResolvedOrigin>

Implementors§