dashboard

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

Hub maintains the set of active WebSocket clients and broadcasts events.

func NewHub

func NewHub() *Hub

NewHub creates a new WebSocket Hub.

func (*Hub) BroadcastEvent

func (h *Hub) BroadcastEvent(event *ringbuffer.TrafficEvent, findings []*analysis.Finding)

BroadcastEvent publishes a newly processed traffic event and any findings to all active dashboard connections.

func (*Hub) Run

func (h *Hub) Run()

Run starts the event loop for the Hub.

func (*Hub) ServeWS

func (h *Hub) ServeWS(w http.ResponseWriter, r *http.Request)

ServeWS handles incoming WebSocket upgrade requests from the dashboard.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server provides the embedded HTTP management console and REST/WebSocket API.

func NewServer

func NewServer(addr string, store *storage.Store, hub *Hub, ca *certs.CertificateAuthority) *Server

NewServer creates a new dashboard Server instance.

func (*Server) Close

func (s *Server) Close() error

Close terminates the dashboard server.

func (*Server) SetContractValidator

func (s *Server) SetContractValidator(cv *contract.Validator)

SetContractValidator configures the OpenAPI contract validator.

func (*Server) SetMockEngine

func (s *Server) SetMockEngine(eng *mock.Engine)

SetMockEngine configures the mock & chaos engine.

func (*Server) SetReplayer

func (s *Server) SetReplayer(r *replay.Replayer)

SetReplayer configures the request replay & diff engine.

func (*Server) Start

func (s *Server) Start() error

Start launches the HTTP server for the dashboard.

type WSMessage

type WSMessage struct {
	Type     string              `json:"type"` // "REQUEST", "FINDING", "STATS"
	Event    interface{}         `json:"event,omitempty"`
	Findings []*analysis.Finding `json:"findings,omitempty"`
}

WSMessage format for dashboard communication.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL