pub struct TunnelClosedJson {
pub ok: bool,
pub event: String,
pub vps: String,
pub reason: TunnelCloseReason,
pub bind: String,
pub local_port: u16,
pub forwards_served: u64,
pub capacity_waits: u64,
pub duration_ms: u64,
pub mode: String,
}Expand description
tunnel --json shutdown event.
G-TUN-R07: the tunnel used to emit tunnel_listening and then fall silent until
death, so three very different endings shared exit 0 — deadline reached, signal
received, and a fatal accept error that broke the loop early. The last case was
the worst: because bound was already true, the timeout wrapper returned Ok(())
and the process reported success even though it had stopped accepting connections
seconds into a five-minute deadline. Those are now distinguishable.
Fields§
§ok: booltrue when the tunnel served its full lifetime.
event: StringDiscriminator: "tunnel_closed".
vps: StringVPS name.
reason: TunnelCloseReasonWhy the tunnel stopped.
bind: StringEffective local bind address.
local_port: u16Local listen port that was served.
forwards_served: u64Connections accepted and forwarded during the tunnel’s lifetime.
G-TUN-R11: answers the most basic diagnostic question — did anything ever connect? A tunnel that bound correctly but was never used produced output identical to one that served five hundred connections.
capacity_waits: u64Times a new connection had to wait for a concurrency permit.
G-TUN-R12: saturation was previously invisible, so the symptom was rising latency with no stated cause and the operator could hunt the network instead.
duration_ms: u64Wall-clock lifetime in milliseconds.
mode: StringWhich tunnel mode was serving (mirrors TunnelListeningJson::mode).
Trait Implementations§
Source§impl Clone for TunnelClosedJson
impl Clone for TunnelClosedJson
Source§fn clone(&self) -> TunnelClosedJson
fn clone(&self) -> TunnelClosedJson
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TunnelClosedJson
impl Debug for TunnelClosedJson
Source§impl<'de> Deserialize<'de> for TunnelClosedJson
impl<'de> Deserialize<'de> for TunnelClosedJson
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TunnelClosedJson
Source§impl PartialEq for TunnelClosedJson
impl PartialEq for TunnelClosedJson
Source§impl Serialize for TunnelClosedJson
impl Serialize for TunnelClosedJson
impl StructuralPartialEq for TunnelClosedJson
Auto Trait Implementations§
impl Freeze for TunnelClosedJson
impl RefUnwindSafe for TunnelClosedJson
impl Send for TunnelClosedJson
impl Sync for TunnelClosedJson
impl Unpin for TunnelClosedJson
impl UnsafeUnpin for TunnelClosedJson
impl UnwindSafe for TunnelClosedJson
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.