saluki_env/host/mod.rs
1//! Host provider.
2//!
3//! This module provides the `HostProvider` trait, which deals with providing information about the process host itself.
4//!
5//! A default host provider implementation, based on the Datadog Agent, is included.
6
7pub mod providers;
8
9use async_trait::async_trait;
10
11/// Provides information about the process host itself.
12#[async_trait]
13pub trait HostProvider {
14 /// Errors produced by the provider.
15 type Error;
16
17 /// Gets the hostname of the process host.
18 ///
19 /// # Errors
20 ///
21 /// If an error occurs while querying the hostname, an error is returned.
22 async fn get_hostname(&self) -> Result<String, Self::Error>;
23}