pub struct LazyEnvBindingsProvider { /* private fields */ }Expand description
Environment-backed provider that defers cloud client configuration until the first binding is actually used.
Runtime-less Containers and Daemons resolve bindings in the application process. They should still start when no startup secret needs loading, even if cloud metadata is temporarily unavailable.
On first binding use it resolves credentials in a fixed order (see
LazyEnvBindingsProvider::select): native/projected ClientConfig::from_env
first, then minting-backed resolution if an external/bootstrap caller
explicitly supplied the mint environment contract, otherwise the original
from_env error is surfaced unchanged.
Trait Implementations§
Source§impl BindingsProviderApi for LazyEnvBindingsProvider
impl BindingsProviderApi for LazyEnvBindingsProvider
Source§fn load_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_storage<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Storage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Storage implementation.
Source§fn load_build<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Build>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_build<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Build>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Build implementation.
Source§fn load_artifact_registry<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ArtifactRegistry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_artifact_registry<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ArtifactRegistry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds an ArtifactRegistry implementation.
Source§fn load_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Vault>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Vault>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Vault implementation.
Source§fn load_kv<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Kv>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_kv<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Kv>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a KV implementation.
Source§fn load_postgres<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Postgres>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_postgres<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Postgres>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Postgres implementation. Read more
Source§fn load_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Queue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_queue<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Queue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Queue implementation.
Source§fn load_worker<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Worker>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_worker<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Worker>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Worker implementation.
Source§fn load_container<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Container>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_container<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Container>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a Container implementation.
Source§fn load_service_account<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ServiceAccount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_service_account<'life0, 'life1, 'async_trait>(
&'life0 self,
binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ServiceAccount>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given a binding identifier, builds a ServiceAccount implementation.
Source§fn resolve_runtime_only_binding_env<'life0, 'life1, 'async_trait>(
&'life0 self,
_binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<HashMap<String, String>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_runtime_only_binding_env<'life0, 'life1, 'async_trait>(
&'life0 self,
_binding_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<HashMap<String, String>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Runtime-only binding env vars (a local Postgres connection with its password) for the given
resource — re-resolved on every (re)start so the secret reaches the worker process but is
never written to persisted worker metadata. Default
None: cloud providers carry a secret
locator (not a password) and use the normal persisted path.Auto Trait Implementations§
impl !Freeze for LazyEnvBindingsProvider
impl !RefUnwindSafe for LazyEnvBindingsProvider
impl !UnwindSafe for LazyEnvBindingsProvider
impl Send for LazyEnvBindingsProvider
impl Sync for LazyEnvBindingsProvider
impl Unpin for LazyEnvBindingsProvider
impl UnsafeUnpin for LazyEnvBindingsProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<K, Q> Comparable<Q> for K
impl<K, Q> Comparable<Q> for K
Source§impl<K, Q> Equivalent<Q> for K
impl<K, Q> Equivalent<Q> for K
Source§fn equivalent(&self, key: &Q) -> bool
fn equivalent(&self, key: &Q) -> bool
Compare self to
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.