Documentation
¶
Overview ¶
Package ctlbridge pkg/wasmhv/ctlbridge/ctlbridge.go c3-vis-wasm
It lets an EXTERNAL operator (curl, or `skywire cli`) drive the in-browser wasm-visor tab(s) without anyone clicking: each tab connects back over SSE (GET /ctl/events) to receive commands and POSTs results (/ctl/result) + log lines (/ctl/log). Two tabs can be orchestrated headlessly — e.g. `listen` on one and dial from the other.
The handler set is mounted by `skywire cli hv serve --harness`, so the production serving path opts into the debug surface behind a flag. The browser side is ctl-bridge.js (embedded in pkg/wasmhv as CtlBridgeJS); inject it onto the page to activate the tab.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
Bridge holds the live tab registry + pending-command table. Safe for concurrent use. Create with New, wire with Register.
func New ¶
New returns a ready Bridge. logf is used for connection/bridge diagnostics (pass log.Printf, or nil to discard).