Documentation
¶
Overview ¶
Package events pushes app events (session status, titles, touched — anything the backend pushes to the UI) to the local WebSocket client on /events (see docs/native-window.md). While no client is connected events are dropped — the window owns the connection, so nobody is listening anyway. It is also the delivery channel terminal I/O falls back to when the dedicated /ws transport is down.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func (*Hub) Gone ¶ added in v0.73.0
func (h *Hub) Gone() <-chan struct{}
Gone is closed once the client connected now leaves, and already closed with none connected. The client's process ends with its connection, so this is how lich waits for the window it told to close.
func (*Hub) ServeHTTP ¶
func (h *Hub) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP upgrades /events. One client is expected (the shell); a new connection replaces the previous one. The read loop only watches for close. Token auth is applied by the transport mount, like every mounted handler.