use crate::error::Error;
use crate::types::ResolvedValue;
use async_trait::async_trait;
#[async_trait]
pub trait ConfigProvider: Send + Sync {
fn name(&self) -> &str;
async fn resolve(&self) -> Result<ResolvedValue, Error>;
fn resolve_sync(&self) -> Result<ResolvedValue, Error> {
Err(Error::SyncResolutionNotSupported(self.name().to_string()))
}
}
#[cfg(feature = "aws")]
pub mod aws;
#[cfg(feature = "digital-ocean")]
pub mod digital_ocean;
#[cfg(feature = "ipify")]
pub mod ipify;
#[cfg(feature = "aws")]
pub use aws::*;
#[cfg(feature = "digital-ocean")]
pub use digital_ocean::*;
#[cfg(feature = "ipify")]
pub use ipify::*;