Skip to main content
Corvus Connection

ConnectionHealthContext

Context
TheOmenDen.StreamPulse.Scripting.Contexts.ConnectionHealthContextThe one event context bound for every connection-health handler (spec 023) — [OnConnectionUp], [OnConnectionDown], [OnConnectionLost], [OnConnectionRestored], [OnConnectionFailed]. A trigger fires for every applicable source; a hand-written handler reads Source and branches, while a graph node bakes the chosen source as a compiled guard (if (!string.Equals(e.Source, "obs", …)) return;). Per-trigger-optional fields are populated only where meaningful: each node surfaces only its relevant output ports. Source is the source name ("Twitch"/"Obs"/"Spotify"/"Gateway") as a string — the scripting SDK deliberately does not expose the server-side ConnectionSource enum, so the script surface stays free of internal Domain types.

Members

8
  • Source
    property
    string Source
    Which connection changed state (the source name).
  • OccurredAt
    property
    DateTimeOffset OccurredAt
    When the transition happened.
  • Reason
    property
    string Reason
    Free-text detail on Failed/Lost/Down (e.g. "401 unauthorized"); else null.
  • Downtime
    property
    TimeSpan? Downtime
    Set on Restored (how long the source was Interrupted); else null.
  • AttemptCount
    property
    int AttemptCount
    Attempts before recovery on Restored; always 1 on Failed; 0 otherwise.
  • ClientId
    property
    string ClientId
    Gateway client id — set only when Source is "Gateway".
  • ClientName
    property
    string ClientName
    Gateway client name — set only when Source is "Gateway".
  • Categories
    property
    IReadOnlyList<string> Categories
    Gateway client subscribed categories — set only when Source is "Gateway".