ElectronBridge provides integration with Electron framework. Electron uses a local HTTP server similar to Tauri, but with additional support for Electron's IPC mechanism via WebSocket. Communication flow: 1. Electron preload script connects to localhost:PORT via WebSocket 2. Messages are sent bidir
| 40 | // // In renderer.js |
| 41 | // window.aster.chat(agentId, message); |
| 42 | type ElectronBridge struct { |
| 43 | app *App |
| 44 | handler MessageHandler |
| 45 | agents map[string]*agent.Agent |
| 46 | agentsMu sync.RWMutex |
| 47 | server *http.Server |
| 48 | port int |
| 49 | wsClients map[string]*wsClient |
| 50 | wsMu sync.RWMutex |
| 51 | ctx context.Context |
| 52 | cancel context.CancelFunc |
| 53 | } |
| 54 | |
| 55 | // wsClient represents a WebSocket client |
| 56 | type wsClient struct { |
nothing calls this directly
no outgoing calls
no test coverage detected