pub struct DistributedSolver { /* private fields */ }Expand description
Wraps any Solver for clustered / distributed deployments.
Before delegating to the inner solver, the distributed solver stores the
challenge data (domain, token, key_auth) in shared Storage so that
other cluster members can read it and respond to validation requests.
During cleanup, the challenge data is removed from storage and the inner solver’s cleanup method is also called.
Implementations§
Source§impl DistributedSolver
impl DistributedSolver
Sourcepub fn new(
inner: Box<dyn Solver>,
storage: Arc<dyn Storage>,
) -> DistributedSolver
pub fn new( inner: Box<dyn Solver>, storage: Arc<dyn Storage>, ) -> DistributedSolver
Create a new distributed solver wrapping inner, using storage for
cross-instance coordination.
Challenge tokens are stored under the default prefix
(challenge_tokens/). Use DistributedSolver::with_prefix to
specify an issuer-specific prefix.
Sourcepub fn with_prefix(
inner: Box<dyn Solver>,
storage: Arc<dyn Storage>,
prefix: String,
) -> DistributedSolver
pub fn with_prefix( inner: Box<dyn Solver>, storage: Arc<dyn Storage>, prefix: String, ) -> DistributedSolver
Create a new distributed solver with an issuer-specific storage key prefix.
The prefix is prepended to the challenge tokens storage path, e.g.
"<prefix>/challenge_tokens/<domain>/<token>.json".
Trait Implementations§
Source§impl Debug for DistributedSolver
impl Debug for DistributedSolver
Source§impl Solver for DistributedSolver
impl Solver for DistributedSolver
Source§fn present<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
DistributedSolver: 'async_trait,
fn present<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
DistributedSolver: 'async_trait,
Source§fn wait<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
DistributedSolver: 'async_trait,
fn wait<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
DistributedSolver: 'async_trait,
Source§fn cleanup<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
DistributedSolver: 'async_trait,
fn cleanup<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
DistributedSolver: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for DistributedSolver
impl !UnwindSafe for DistributedSolver
impl Freeze for DistributedSolver
impl Send for DistributedSolver
impl Sync for DistributedSolver
impl Unpin for DistributedSolver
impl UnsafeUnpin for DistributedSolver
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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