pub struct CertificateTracker { /* private fields */ }Expand description
In-memory tracker for certificate lifecycle management.
Stores issued certificates and provides methods to identify which certificates need renewal or have expired.
Implementations§
Source§impl CertificateTracker
impl CertificateTracker
Sourcepub fn with_renew_window(renew_before_secs: u64) -> Self
pub fn with_renew_window(renew_before_secs: u64) -> Self
Create a tracker with a custom renewal window.
Sourcepub async fn track(
&self,
domains: Vec<String>,
pem_chain: String,
issued_at: u64,
expires_at: u64,
) -> String
pub async fn track( &self, domains: Vec<String>, pem_chain: String, issued_at: u64, expires_at: u64, ) -> String
Store a certificate record. The key is the primary domain name.
Sourcepub async fn get(&self, domain: &str) -> Option<CertificateRecord>
pub async fn get(&self, domain: &str) -> Option<CertificateRecord>
Get a certificate record by primary domain.
Sourcepub async fn due_for_renewal(&self) -> Vec<String>
pub async fn due_for_renewal(&self) -> Vec<String>
List all domains that need renewal.
Sourcepub async fn remove_expired(&self) -> usize
pub async fn remove_expired(&self) -> usize
Remove expired certificate records.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CertificateTracker
impl !RefUnwindSafe for CertificateTracker
impl Send for CertificateTracker
impl Sync for CertificateTracker
impl Unpin for CertificateTracker
impl UnsafeUnpin for CertificateTracker
impl !UnwindSafe for CertificateTracker
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
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