pub struct NatsSection {
pub url: String,
pub monitor_url: Option<String>,
}Fields§
§url: String§monitor_url: Option<String>#1270: base URL of the broker’s HTTP monitoring endpoint (the
http_port in nats-server.conf, 8222 by default). The backend
polls /connz there to learn which NATS user each agent’s live
connection authenticated as.
Optional: when unset it is derived from Self::url by swapping
the scheme for http and the port for 8222, which is right for the
standard single-broker deploy. Set it when monitoring listens
elsewhere. Unreachable / disabled monitoring is not fatal — the
projection simply stays unpopulated.
Implementations§
Source§impl NatsSection
impl NatsSection
Sourcepub fn resolved_monitor_url(&self) -> String
pub fn resolved_monitor_url(&self) -> String
The monitoring base URL to poll — configured, or derived from
Self::url.
Derivation deliberately keeps only the host: the client URL’s
port is the client port (4222), its scheme may be nats/tls/ws
(none of which the monitoring endpoint speaks), and it may carry
inline credentials that must not be re-sent over plain HTTP.
Trait Implementations§
Source§impl Clone for NatsSection
impl Clone for NatsSection
Source§fn clone(&self) -> NatsSection
fn clone(&self) -> NatsSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more