pub struct UpkeepCheck { /* private fields */ }Expand description
The hosting job’s daily upkeep check (spec 3.5 §7.20): advisories against the edge’s lockfile and the certificate’s expiry, each found proposal filed once as a decision card to the owner, with an alarm by its urgency.
Implementations§
Source§impl UpkeepCheck
impl UpkeepCheck
Sourcepub fn new(
site: Uuid,
domain: impl Into<String>,
app: impl Into<String>,
owner: impl Into<String>,
approvals: Arc<dyn ApprovalService>,
) -> Self
pub fn new( site: Uuid, domain: impl Into<String>, app: impl Into<String>, owner: impl Into<String>, approvals: Arc<dyn ApprovalService>, ) -> Self
A check for site at domain of app app, filing cards for owner in approvals.
Sourcepub fn with_advisories(
self,
lockfile: impl AsRef<Path>,
source: Arc<dyn AdvisorySource>,
) -> Self
pub fn with_advisories( self, lockfile: impl AsRef<Path>, source: Arc<dyn AdvisorySource>, ) -> Self
Reads lockfile against source (spec 3.5 §7.19 “advisories daily”).
Sourcepub fn with_certificate(self, source: Arc<dyn CertificateSource>) -> Self
pub fn with_certificate(self, source: Arc<dyn CertificateSource>) -> Self
Reads the certificate’s expiry from source.
Sourcepub fn with_alarms(self, router: Arc<AlarmRouter>) -> Self
pub fn with_alarms(self, router: Arc<AlarmRouter>) -> Self
Raises each new proposal’s alarm on router.
Sourcepub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
pub fn with_clock(self, clock: Arc<dyn Clock>) -> Self
The clock.
Sourcepub async fn run(&self) -> Result<UpkeepReport>
pub async fn run(&self) -> Result<UpkeepReport>
Finds the proposals and files the new ones (spec 3.5 §7.20).
§Errors
The approval service’s error; what cannot be read is reported, not raised.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for UpkeepCheck
impl !UnwindSafe for UpkeepCheck
impl Forget for UpkeepCheck
impl Freeze for UpkeepCheckwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn ApprovalService> is !null: Freeze,
PhantomData<ArcInner<dyn ApprovalService>>: Freeze,
*const ArcInner<AlarmRouter> is !null: Freeze,
PhantomData<ArcInner<AlarmRouter>>: Freeze,
*const ArcInner<dyn AdvisorySource> is !null: Freeze,
PhantomData<ArcInner<dyn AdvisorySource>>: Freeze,
*const ArcInner<dyn CertificateSource> is !null: Freeze,
PhantomData<ArcInner<dyn CertificateSource>>: Freeze,
*const ArcInner<dyn Clock> is !null: Freeze,
PhantomData<ArcInner<dyn Clock>>: Freeze,
impl Move for UpkeepCheck
impl Send for UpkeepCheckwhere
RawVecInner: Send,
Arc<dyn ApprovalService>: Send,
Arc<AlarmRouter>: Send,
Arc<dyn AdvisorySource>: Send,
Arc<dyn CertificateSource>: Send,
Arc<dyn Clock>: Send,
impl Sync for UpkeepCheckwhere
RawVecInner: Sync,
Arc<dyn ApprovalService>: Sync,
Arc<AlarmRouter>: Sync,
Arc<dyn AdvisorySource>: Sync,
Arc<dyn CertificateSource>: Sync,
Arc<dyn Clock>: Sync,
impl Unpin for UpkeepCheckwhere
*const u8 is !null: Unpin,
Arc<dyn ApprovalService>: Unpin,
Arc<AlarmRouter>: Unpin,
Arc<dyn AdvisorySource>: Unpin,
Arc<dyn CertificateSource>: Unpin,
Arc<dyn Clock>: Unpin,
impl UnsafeUnpin for UpkeepCheckwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn ApprovalService> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ApprovalService>>: UnsafeUnpin,
*const ArcInner<AlarmRouter> is !null: UnsafeUnpin,
PhantomData<ArcInner<AlarmRouter>>: UnsafeUnpin,
*const ArcInner<dyn AdvisorySource> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AdvisorySource>>: UnsafeUnpin,
*const ArcInner<dyn CertificateSource> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn CertificateSource>>: UnsafeUnpin,
*const ArcInner<dyn Clock> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Clock>>: UnsafeUnpin,
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
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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