Versions in this module Expand all Collapse all v1 v1.0.0 Feb 1, 2026 Changes in this version + type EndpointInfo struct + ConnectTime time.Time + Connected bool + DiscoveredFrom string + Error error + Messages []Message + Protocols []string + URL string + type Handler struct + func NewHandler() *Handler + func (h *Handler) Clear() + func (h *Handler) Connect(ctx context.Context, wsURL, sourceURL string) error + func (h *Handler) Count() int + func (h *Handler) Disable() + func (h *Handler) Enable() + func (h *Handler) GetEndpoints() []WebSocketEndpoint + func (h *Handler) HasEndpoint(wsURL string) bool + func (h *Handler) SendMessage(ctx context.Context, wsURL string, msgType int, data []byte) error + func (h *Handler) SetCookies(cookies []*http.Cookie) + func (h *Handler) SetHeaders(headers map[string]string) + func (h *Handler) SetMaxMessages(max int) + func (h *Handler) SetMessageTimeout(timeout time.Duration) + type Message struct + Data []byte + Direction string + Timestamp time.Time + Type int + type PatternAnalysis struct + AverageSize int + HasJSON bool + MaxSize int + MessageCount int + MessageTypes map[string]int + MinSize int + ReceivedCount int + SentCount int + URL string + type RecordedMessage struct + Data []byte + Direction string + Size int + Timestamp time.Time + Type string + type RecordedSession struct + Active bool + EndTime time.Time + Messages []RecordedMessage + StartTime time.Time + TotalReceived int + TotalSent int + URL string + type Recorder struct + func NewRecorder(maxMessages int) *Recorder + func (r *Recorder) AnalyzePatterns(url string) *PatternAnalysis + func (r *Recorder) Clear() + func (r *Recorder) EndSession(url string) + func (r *Recorder) ExportJSON() ([]byte, error) + func (r *Recorder) GetActiveSessions() []*RecordedSession + func (r *Recorder) GetAllSessions() []*RecordedSession + func (r *Recorder) GetSession(url string) *RecordedSession + func (r *Recorder) RecordMessage(url string, direction, msgType string, data []byte) + func (r *Recorder) StartSession(url string) + func (r *Recorder) Stats() RecorderStats + type RecorderStats struct + ActiveSessions int + TotalMessages int + TotalSessions int + type WebSocketEndpoint struct + DiscoveredFrom string + Protocols []string + SampleMessages []WebSocketMsg + Timestamp time.Time + URL string + type WebSocketMsg struct + Data string + Direction string + Timestamp time.Time + Type string