config_resolver/providers/
mod.rs1use crate::error::Error;
2use crate::types::ResolvedValue;
3use async_trait::async_trait;
4
5#[async_trait]
7pub trait ConfigProvider: Send + Sync {
8 fn name(&self) -> &str;
10
11 async fn resolve(&self) -> Result<ResolvedValue, Error>;
13
14 fn resolve_sync(&self) -> Result<ResolvedValue, Error> {
16 Err(Error::SyncResolutionNotSupported(self.name().to_string()))
17 }
18}
19
20#[cfg(feature = "aws")]
21pub mod aws;
22#[cfg(feature = "digital-ocean")]
23pub mod digital_ocean;
24#[cfg(feature = "ipify")]
25pub mod ipify;
26
27#[cfg(feature = "aws")]
28pub use aws::*;
29#[cfg(feature = "digital-ocean")]
30pub use digital_ocean::*;
31#[cfg(feature = "ipify")]
32pub use ipify::*;