pub struct RegistryHandles {
pub staker_set: Arc<dyn StakerSet>,
pub node_addresses: Option<Arc<dyn NodeAddressResolver>>,
pub regions: Arc<RwLock<HashMap<NodeId, String>>>,
pub operator_to_node: Arc<RwLock<HashMap<Address, NodeId>>>,
pub dial_addrs: DialAddrDirectory,
/* private fields */
}Expand description
Both projections, plus the shared watcher that keeps them current.
node_addresses is None when cache.node_to_node_pull_through_enabled is
off: the bindings projection is not built at all, so nothing ever moves
node_address_directory_size off 0.
The gauge is still exported in that state — every DecdnMetrics field
registers unconditionally as one group — so a pull-through-off node (the
default) publishes a permanent 0, which is indistinguishable from a
pull-through-on node whose directory has collapsed. Any alert on this gauge
must therefore be scoped to nodes with pull-through on. Making it genuinely
absent needs a split group or a labelled family; see #1231.
Fields§
§staker_set: Arc<dyn StakerSet>The bonded-operator set the DHT admits records from.
node_addresses: Option<Arc<dyn NodeAddressResolver>>NodeId → dial address, present only where pull-through is on.
regions: Arc<RwLock<HashMap<NodeId, String>>>NodeId → regionHint, as the canonical decdn_protocol::Region code;
an empty or invalid hint has no entry. Read by the ADR-030 region-latency penalty on the selection/pull path.
Always present, unlike node_addresses.
operator_to_node: Arc<RwLock<HashMap<Address, NodeId>>>operator address → bound NodeId, always built (like regions, unlike
the pull-through-gated bindings) so the chain-backed origin directory
can resolve operators locally with no nodeIdOf RPC.
dial_addrs: DialAddrDirectoryNodeId → registry-published direct dial addresses, always built. The
runtime adds its DialAddrDirectory::lookup to the node’s endpoint.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RegistryHandles
impl !Sync for RegistryHandles
impl !UnwindSafe for RegistryHandles
impl Freeze for RegistryHandles
impl Send for RegistryHandles
impl Unpin for RegistryHandles
impl UnsafeUnpin for RegistryHandles
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> 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