Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct {
Type string `json:"type"` // "ping" | "subscribe" | "unsubscribe"
Event string `json:"event,omitempty"` // event type, e.g., "step-stats"
Ids []int32 `json:"ids,omitempty"` // subscribed ids; empty slice means "all ids for this event"
}
Message represents the structure of incoming messages
type OutEvent ¶
type OutEvent struct {
Type string `json:"type,omitempty"` // e.g., "step-stats"
Id int32 `json:"id,omitempty"` // e.g., workflow id
}
OutEvent is the minimal envelope we inspect in outgoing messages. Server should always set an event Type and a single Id for routing.
type WSEvent ¶
type WSEvent struct {
EventId uint64 `json:"event_id"` // monotonic, filled by EmitWS
Type string `json:"type"` // entity: "task","worker","workflow","step","job","user"
Id int32 `json:"id,omitempty"` // optional: present for single-entity events
Action string `json:"action,omitempty"` // e.g., "created","updated","deleted","status"
Payload interface{} `json:"payload,omitempty"` // additional data
}
WS event envelope and helper. Every emitted message carries a monotonically-increasing EventId so a client that reconnects after a dropped WebSocket can ask for replay via ?since=<lastEventId>. Without this the UI would silently miss a status flip and stay stale until a full page refresh (the source of the "compile appears done before hermes finishes" symptom on 2026-09-21).
Click to show internal directories.
Click to hide internal directories.