pub struct DhtStatusHandles {
pub routing: Arc<Mutex<RoutingTable>>,
pub staker_set: Arc<dyn StakerSet>,
pub record_store: Arc<Mutex<RecordStore>>,
pub republish: Arc<RepublishScheduler>,
pub refresh_clock: Arc<AtomicU64>,
pub refresh_interval: Duration,
}Expand description
Read-only DHT subsystem handles the admin_v1_status handler snapshots
(issue #741). Each shared-state field is an Arc clone of state the
runtime already owns and shares with the DHT handler / refresh /
republish tasks (plus the Copy refresh_interval), so attaching this
to AdminState adds no new ownership — only read access. Bundled into
one struct so the AdminState constructor stays a single optional
argument rather than five positional ones.
Fields§
§routing: Arc<Mutex<RoutingTable>>Kademlia routing table (same handle the DHT handler / bucket-refresh task mutate). Locked briefly to snapshot bucket fill counts.
staker_set: Arc<dyn StakerSet>Active-staker set (chain-backed in production). Read for its count.
record_store: Arc<Mutex<RecordStore>>Provider-record store. Locked briefly to read size + capacity.
republish: Arc<RepublishScheduler>Republish scheduler. Read for its scheduled-record depth.
refresh_clock: Arc<AtomicU64>Wall-clock-µs of the last completed bucket-refresh pass (0 = never),
stamped by crate::dht::bucket_refresh::run_bucket_refresh.
refresh_interval: DurationBucket-refresh interval, echoed so the operator sees the cadence the last-refresh timestamp is relative to.
Trait Implementations§
Source§impl Clone for DhtStatusHandles
impl Clone for DhtStatusHandles
Auto Trait Implementations§
impl !RefUnwindSafe for DhtStatusHandles
impl !UnwindSafe for DhtStatusHandles
impl Freeze for DhtStatusHandles
impl Send for DhtStatusHandles
impl Sync for DhtStatusHandles
impl Unpin for DhtStatusHandles
impl UnsafeUnpin for DhtStatusHandles
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request