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
| 20 | // - For web-based deployments |
| 21 | // - As a base for custom integrations |
| 22 | type 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 |
| 36 | func NewWebBridge(app *App, port int) (*WebBridge, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected