pub struct Renewer { /* private fields */ }Expand description
The steward’s renewal pull.
Implementations§
Source§impl Renewer
impl Renewer
Sourcepub fn new(
store: Arc<CheckoutGrantStore>,
exchange: Arc<ArtifactExchange>,
client: Arc<dyn LicenceClient>,
flood: Arc<dyn GrantFlood>,
chain: Option<Arc<ChainManager>>,
cfg: RenewalConfig,
) -> Arc<Self> ⓘ
pub fn new( store: Arc<CheckoutGrantStore>, exchange: Arc<ArtifactExchange>, client: Arc<dyn LicenceClient>, flood: Arc<dyn GrantFlood>, chain: Option<Arc<ChainManager>>, cfg: RenewalConfig, ) -> Arc<Self> ⓘ
A renewer over the steward’s client (it signs for the binding in effect).
Sourcepub async fn run_once(&self) -> Result<RenewalReport, LicenceClientError>
pub async fn run_once(&self) -> Result<RenewalReport, LicenceClientError>
One pass: renew, then catch up. Errors only for a failed call.
Sourcepub async fn release(
&self,
cog_id: &str,
version: &str,
) -> Result<RenewalReport, LicenceClientError>
pub async fn release( &self, cog_id: &str, version: &str, ) -> Result<RenewalReport, LicenceClientError>
Operator release of one checkout: the Seed withdraws it (and renews
the others, as every renewal does); everything it returns is
installed and flooded, the withdrawal first. A pass this node may not
make is skipped, nothing sent.
Sourcepub fn next_delay(&self, failures: u32) -> Duration
pub fn next_delay(&self, failures: u32) -> Duration
The delay before the next pass after failures failed passes in a row.
Auto Trait Implementations§
impl !Freeze for Renewer
impl !RefUnwindSafe for Renewer
impl !UnwindSafe for Renewer
impl Send for Renewer
impl Sync for Renewer
impl Unpin for Renewer
impl UnsafeUnpin for Renewer
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
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