pub struct SqlShimResolver { /* private fields */ }Expand description
Resolves a workload’s sql ComputeBindings to a shim endpoint + credential
injected into the guest env. Holds the same SqlBackends provider a handler uses,
the shim registry, the guest-reachable shim base URL, and a per-node secret used
to derive a token that is deterministic (recomputable at release / re-register
without persisting it) yet unguessable (keyed by the secret).
Implementations§
Trait Implementations§
Source§impl ComputeBindingResolver for SqlShimResolver
impl ComputeBindingResolver for SqlShimResolver
Source§fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
replica: u32,
bindings: &'life3 [ComputeBinding],
) -> Pin<Box<dyn Future<Output = Vec<(String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
replica: u32,
bindings: &'life3 [ComputeBinding],
) -> Pin<Box<dyn Future<Output = Vec<(String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolve
bindings to (env_key, env_value) pairs to inject into the guest,
registering the shim state for (project, workload, replica).Source§fn release<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
replica: u32,
bindings: &'life3 [ComputeBinding],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn release<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
replica: u32,
bindings: &'life3 [ComputeBinding],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Release the shim state for a torn-down replica.
Auto Trait Implementations§
impl !RefUnwindSafe for SqlShimResolver
impl !UnwindSafe for SqlShimResolver
impl Freeze for SqlShimResolver
impl Send for SqlShimResolver
impl Sync for SqlShimResolver
impl Unpin for SqlShimResolver
impl UnsafeUnpin for SqlShimResolver
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more