Documentation
¶
Index ¶
- type Event
- func NewForwarderEvent(p *ForwarderPayload) *Event
- func NewHeartbeatEvent() *Event
- func NewIssueEvent(p *IssuePayload) *Event
- func NewLogEvent(p *LogPayload) *Event
- func NewMetricEvent(p *MetricPayload) *Event
- func NewSpanEvent(p *SpanPayload) *Event
- func NewThroughputEvent(p *ThroughputPayload) *Event
- type ForwarderPayload
- type Hub
- type IssuePayload
- type LogPayload
- type MetricPayload
- type SpanEvent
- type SpanPayload
- type ThroughputPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type string `json:"type"`
Timestamp int64 `json:"timestamp_ns"`
Payload any `json:"payload"`
}
Event is the outer discriminated union sent over the WebSocket.
func NewForwarderEvent ¶
func NewForwarderEvent(p *ForwarderPayload) *Event
func NewHeartbeatEvent ¶ added in v0.2.0
func NewHeartbeatEvent() *Event
NewHeartbeatEvent is a payload-less liveness beat the server sends on a timer. Clients use its arrival (and the silence when it stops) to track connectivity.
func NewIssueEvent ¶
func NewIssueEvent(p *IssuePayload) *Event
func NewLogEvent ¶
func NewLogEvent(p *LogPayload) *Event
func NewMetricEvent ¶
func NewMetricEvent(p *MetricPayload) *Event
func NewSpanEvent ¶
func NewSpanEvent(p *SpanPayload) *Event
func NewThroughputEvent ¶
func NewThroughputEvent(p *ThroughputPayload) *Event
type ForwarderPayload ¶
type IssuePayload ¶
type LogPayload ¶
type MetricPayload ¶
type SpanEvent ¶
type SpanEvent = SpanPayload
SpanEvent is kept as a backward-compat alias for SpanPayload.
type SpanPayload ¶
type ThroughputPayload ¶
Click to show internal directories.
Click to hide internal directories.