pub trait SecretProvider: Send + Sync {
// Required methods
fn get(
&self,
path: &str,
key: Option<&str>,
) -> impl Future<Output = SecretsResult<SecretValue>> + Send;
fn health_check(&self) -> impl Future<Output = SecretsResult<()>> + Send;
fn name(&self) -> &'static str;
}Available on crate feature
secrets only.Expand description
Trait for secret providers.
Required Methods§
Sourcefn get(
&self,
path: &str,
key: Option<&str>,
) -> impl Future<Output = SecretsResult<SecretValue>> + Send
fn get( &self, path: &str, key: Option<&str>, ) -> impl Future<Output = SecretsResult<SecretValue>> + Send
Get a secret by path/key.
Sourcefn health_check(&self) -> impl Future<Output = SecretsResult<()>> + Send
fn health_check(&self) -> impl Future<Output = SecretsResult<()>> + Send
Check if the provider is healthy/reachable.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".