pub struct AdminRpcImpl { /* private fields */ }Expand description
Concrete server implementation backed by the live AdminState.
Implementations§
Source§impl AdminRpcImpl
impl AdminRpcImpl
Sourcepub const fn new(state: AdminState) -> Self
pub const fn new(state: AdminState) -> Self
Serve the admin RPC methods against state.
Trait Implementations§
Source§impl AdminRpcServer for AdminRpcImpl
impl AdminRpcServer for AdminRpcImpl
Source§fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<HealthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<HealthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return this node’s identity and process uptime.
Source§fn evict<'life0, 'async_trait>(
&'life0 self,
req: EvictRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<EvictResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn evict<'life0, 'async_trait>(
&'life0 self,
req: EvictRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<EvictResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Evict a single blob from the local cache (issue #279). The
eviction is logical: the iroh-blobs store still holds the bytes
(
Blobs::delete is pub(crate) in iroh-blobs and reserved for
the GC task) until the next periodic GC sweep reclaims them
(#518). The takedown itself is persisted to
<cache_dir>/evicted.log so it survives a restart even when
the next sweep hasn’t run yet. Read moreSource§fn reload<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ReloadResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reload<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<ReloadResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Re-read the config file the node was started with and apply the
reloadable subset (issue #373) — the same path SIGHUP triggers,
exposed over the loopback admin surface for operators who want
scripted control without
kill -HUP. Both paths share the same
RuntimeReloadState::reload, whose internal mutexes serialise
concurrent reloads, so a SIGHUP racing this RPC waits behind it
rather than corrupting state. Returns: Read moreSource§fn drain<'life0, 'async_trait>(
&'life0 self,
req: DrainRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<DrainResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn drain<'life0, 'async_trait>(
&'life0 self,
req: DrainRequest,
) -> Pin<Box<dyn Future<Output = RpcResult<DrainResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trigger graceful shutdown via the same path SIGTERM exercises (issue
#244,
appendix-local-admin-http.md). Stops the iroh router’s accept loop and awaits
in-flight ProtocolHandler::shutdown calls; the subsequent task
drain is bounded by the runtime’s 15s SHUTDOWN_DEADLINE (the
router-shutdown step itself is unbounded — a stuck handler hangs
the runtime, only the post-router task join is timeout-gated). Read moreSource§fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<StatusResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<StatusResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a snapshot of this node’s DHT participation health (issue
#741): routing-table bucket fill rates, the network-wide last
bucket-refresh timestamp, active-staker count, provider-record
store utilization, and republish-scheduler depth. Intended for
decdn node status, giving operators a single human-readable (or
--json) view to diagnose cold-start or routing-table
degradation without scraping Prometheus. Returns
DHT_UNAVAILABLE_CODE when the DHT subsystem is not wired on
this node.Source§fn lanes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<LanesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn lanes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<LanesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a live snapshot of every lane this node provides against a
PaymentPool (issue #749): per lane the outstanding accrued claim,
time since the last voucher (in-memory, None after a restart
until the next voucher), and whether the accrued claim has reached
the redemption threshold. Backs decdn node lanes, giving
operators a single view to spot lanes approaching settlement,
stale lanes, or unusually high outstanding balances before they
become a liquidity risk — without scraping metrics or logs.
Returns POOL_STORE_ERROR_CODE if the pool state store cannot
be read.Source§fn slashes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SlashesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn slashes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<SlashesResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return every slash the node’s watcher has detected against its own
operator (#1032, G-NODE-05): per slash the
slashId, offense type,
amount, evidence digest, block, and the 30-day appeal-window close time.
Consumed directly by operators/keepers (no CLI subcommand wraps it) so
they notice a slash and file decdn appeal slash in time. Returns
SLASH_DETECTION_UNAVAILABLE_CODE
when the slash watcher is not wired on this node.Source§fn pools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<BuyerPoolsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pools<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<BuyerPoolsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the node’s buyer-side
PaymentPool state: every pool its buyer
leg tracks, the deposit it believes each holds, and the per-lane spend
watermark it has signed against each provider. Read moreSource§impl Clone for AdminRpcImpl
impl Clone for AdminRpcImpl
Auto Trait Implementations§
impl !RefUnwindSafe for AdminRpcImpl
impl !UnwindSafe for AdminRpcImpl
impl Freeze for AdminRpcImpl
impl Send for AdminRpcImpl
impl Sync for AdminRpcImpl
impl Unpin for AdminRpcImpl
impl UnsafeUnpin for AdminRpcImpl
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> 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> ⓘ
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 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>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.