Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientRequest ¶
type ClientRequest struct {
Type string `json:"type"` // "execute" or "stop"
SessionID string `json:"session_id"` // Provide session_id to hot-multiplex
Prompt string `json:"prompt"` // The user input (for "execute")
WorkDir string `json:"work_dir"` // Working directory for CLI (for "execute")
Reason string `json:"reason"` // Reason for stopping (for "stop")
}
ClientRequest represents the JSON payload expected from the WebSocket client.
type ServerResponse ¶
ServerResponse represents the JSON payload sent to the WebSocket client.
type WebSocketHandler ¶
type WebSocketHandler struct {
// contains filtered or unexported fields
}
WebSocketHandler manages a WebSocket connection to a HotPlex Engine.
func NewWebSocketHandler ¶
func NewWebSocketHandler(engine hotplex.HotPlexClient, logger *slog.Logger) *WebSocketHandler
NewWebSocketHandler creates a new handler.
func (*WebSocketHandler) ServeHTTP ¶
func (h *WebSocketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP upgrades the HTTP connection and starts the read loop.
Click to show internal directories.
Click to hide internal directories.