pub struct RuntimeDiagnosticsEndpointConfig { /* private fields */ }Expand description
Fail-closed configuration for the protected runtime diagnostics listener.
Implementations§
Source§impl RuntimeDiagnosticsEndpointConfig
impl RuntimeDiagnosticsEndpointConfig
Sourcepub fn try_new(
bind_addr: SocketAddr,
token_file: PathBuf,
sample_interval: Duration,
allow_insecure_http: bool,
) -> Result<Self, ObservabilityError>
pub fn try_new( bind_addr: SocketAddr, token_file: PathBuf, sample_interval: Duration, allow_insecure_http: bool, ) -> Result<Self, ObservabilityError>
Creates and validates an explicit endpoint configuration.
Non-loopback plain HTTP is allowed only when
allow_insecure_http is true. This flag exists solely for bounded
development clusters where a NetworkPolicy protects the listener.
§Errors
Returns an error for a relative or non-normalized token path, a zero or excessive sampling interval, or a non-loopback listener without the explicit development opt-in.
Sourcepub fn from_env() -> Result<Option<Self>, ObservabilityError>
pub fn from_env() -> Result<Option<Self>, ObservabilityError>
Loads the optional endpoint configuration from process environment.
Both the bind address and token-file reference must be present. Leaving both absent disables the endpoint. A partial configuration fails closed.
§Errors
Returns a sanitized configuration error when the environment is incomplete, malformed, or violates a listener security invariant.