Documentation
¶
Overview ¶
Package control serves the Interceptor UI and the REST + SSE control API on the fixed localhost control port. It bridges the browser UI to the store and the intercept engine and pushes live events (captured flows, hold-queue changes) over Server-Sent Events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct {
// Upstream applies a chained upstream-proxy URL ("" = direct). Set by cmd.
Upstream func(string) error
// contains filtered or unexported fields
}
Hub is the control-plane HTTP handler and live-event broadcaster. It also implements the proxy's Events sink (FlowCaptured).
func New ¶
func New(st *store.Store, eng *intercept.Engine, ca *tlsca.CA, rebind Rebinder, sc *scope.Engine) *Hub
New builds a Hub. eng, ca, and rebind may be nil. If eng is non-nil, the hub registers itself as the intercept change notifier.
func (*Hub) FlowCaptured ¶
FlowCaptured implements proxy.Events: it pushes a captured flow to all live UI subscribers. Safe for concurrent use.