pub struct EventsStatus {
pub connected: bool,
pub last_message_at: Option<String>,
pub reconnect_count: u64,
pub uptime_seconds: u64,
pub reset_epoch: u64,
pub topics_subscribed: Vec<String>,
pub buffer_sizes: BTreeMap<String, usize>,
pub subscriptions: BTreeMap<String, SubscriptionState>,
pub subscribe_refusals: u64,
pub session_rollovers: u64,
pub connector_restarts: u64,
pub persist_failures: u64,
}Expand description
Snapshot of the connector’s state, returned by GET /events/_status.
Fields§
§connected: booltrue if the underlying WS is currently connected.
last_message_at: Option<String>RFC 3339 timestamp of the last frame the connector received, if any.
reconnect_count: u64How many times the connector has reconnected since the process started. Bumps on every successful reconnect, not on each retry.
uptime_seconds: u64Wall-clock seconds since the connector task spawned.
reset_epoch: u64Current reset_epoch. Seeded from the boot time (Unix ms) and
bumped once per successful reconnect — never on a failed attempt.
topics_subscribed: Vec<String>Topics currently subscribed at the upstream WS. Always includes
"orders" and "pnl"; market data topics appear when a client
has polled /events/marketdata?conid=… recently.
buffer_sizes: BTreeMap<String, usize>Per-topic ring buffer occupancy. Useful for “are we close to wraparound?” capacity planning.
subscriptions: BTreeMap<String, SubscriptionState>Whether CPAPI has actually honoured each standing subscription
(orders, pnl). topics_subscribed above records what we ASKED
for; this records what we GOT. The difference is the whole story of
a fill that never arrived: CPAPI answers sor+{} with
{"error":"unable to subscribe"} more often than not, and a socket
that outlives a Gateway re-login keeps heartbeating with every
subscription dead. A consumer confirming fills should treat anything
but subscribed on orders as “the stream will not tell you”.
subscribe_refusals: u64How many subscribe refusals CPAPI has sent since the process started.
session_rollovers: u64How many times the connector tore its socket down because the Gateway’s session id changed underneath it (a re-login).
connector_restarts: u64How many times the connector task panicked and was restarted by its supervisor since the process started.
persist_failures: u64sqlite history appends that failed since the process started.
Trait Implementations§
Source§impl Clone for EventsStatus
impl Clone for EventsStatus
Source§fn clone(&self) -> EventsStatus
fn clone(&self) -> EventsStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more