pub struct CachedRoster { /* private fields */ }Expand description
TTL-bounded cached roster projection (the
resolve_tenant_for_hosted_did shape): lookups serve a snapshot for at
most ROSTER_CACHE_TTL, then one refresh runs while concurrent lookups
keep serving the current snapshot. After the synchronous first load
(spawn path — data must exist before serving), every refresh runs on a
background thread and publishes atomically: the loader opens RocksDB and
verifies every state, the 100 ms currentness watchdog reaches lookups
from async current-thread runtimes, and public ingestion can amplify the
store — so no runtime thread ever executes the scan. Readers never take
a lock across a scan; the snapshot mutex is touched only long enough to
read or swap an Arc.
A refresh that fails loads an EMPTY roster — fail-closed, exactly like an uncached read failure — and a previously loaded snapshot is never resurrected after a failure (that would delay revocation beyond the TTL). Spawn-time checks ride the same cache; at process start it is empty, so the first lookup is a fresh load.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CachedRoster
impl !RefUnwindSafe for CachedRoster
impl Send for CachedRoster
impl Sync for CachedRoster
impl Unpin for CachedRoster
impl UnsafeUnpin for CachedRoster
impl !UnwindSafe for CachedRoster
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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