MCPcopy Create free account
hub / github.com/astercloud/aster / WebBridge

Struct WebBridge

pkg/desktop/bridge_web.go:22–33  ·  view source on GitHub ↗

WebBridge provides a generic HTTP-based bridge for web deployments and development. It uses REST API + SSE for communication. This bridge can be used: - For development without a desktop framework - For web-based deployments - As a base for custom integrations

Source from the content-addressed store, hash-verified

20// - For web-based deployments
21// - As a base for custom integrations
22type WebBridge struct {
23 app *App
24 handler MessageHandler
25 agents map[string]*agent.Agent
26 agentsMu sync.RWMutex
27 server *http.Server
28 port int
29 sseClients map[string]chan *FrontendEvent
30 sseMu sync.RWMutex
31 ctx context.Context
32 cancel context.CancelFunc
33}
34
35// NewWebBridge creates a new web bridge
36func NewWebBridge(app *App, port int) (*WebBridge, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected