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

Struct TauriBridge

pkg/desktop/bridge_tauri.go:40–51  ·  view source on GitHub ↗

TauriBridge provides integration with Tauri framework. Tauri uses a local HTTP server for IPC because the Rust backend communicates with the webview via HTTP/WebSocket. Communication flow: 1. Tauri frontend makes HTTP requests to localhost:PORT 2. TauriBridge handles requests and returns JSON respo

Source from the content-addressed store, hash-verified

38// body: JSON.stringify({ agent_id: 'xxx', message: 'hello' })
39// });
40type TauriBridge struct {
41 app *App
42 handler MessageHandler
43 agents map[string]*agent.Agent
44 agentsMu sync.RWMutex
45 server *http.Server
46 port int
47 sseClients map[string]chan *FrontendEvent
48 sseMu sync.RWMutex
49 ctx context.Context
50 cancel context.CancelFunc
51}
52
53// NewTauriBridge creates a new Tauri bridge
54func NewTauriBridge(app *App, port int) (*TauriBridge, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected