Installation
Quick Start
Configuration
Execute method always uses a 120-second timeout, regardless of the client timeout.
Method Reference
Desktop CRUD
| Method | Returns | Description |
|---|---|---|
CreateDesktop(ctx, desktopType) | (*Desktop, error) | Create a new desktop |
ListDesktops(ctx) | ([]Desktop, error) | List all active desktops |
GetDesktop(ctx, desktopID) | (*Desktop, error) | Get a single desktop by ID |
UpdateDesktop(ctx, desktopID, name) | (*Desktop, error) | Rename a desktop |
DeleteDesktop(ctx, desktopID) | (*DeleteResponse, error) | Delete a desktop |
Tool Execution
| Method | Returns | Description |
|---|---|---|
Execute(ctx, desktopID, tool, action, params) | (*ExecuteResult, error) | Execute a tool action |
ListTools(ctx, desktopID) | ([]ToolSchema, error) | List available tools as JSON Schema |
GetToolLogs(ctx, desktopID) | (json.RawMessage, error) | Get tool execution logs |
Sessions
| Method | Returns | Description |
|---|---|---|
CreateSession(ctx, desktopID) | (*SessionInfo, error) | Create or reconnect an RDP session |
GetSession(ctx, desktopID) | (*SessionInfo, error) | Get current session status |
DeleteSession(ctx, desktopID) | error | Disconnect the session |
Files
Per-desktop shared drive (EFS-backed; persists across controller rebinds; 100 MiB upload cap). All three methods use a 120-second per-call deadline. All three methods accept the sameFileOption variadic; WithPath("subdir") selects a subdirectory for the operation.
| Method | Returns | Description |
|---|---|---|
ListFiles(ctx, desktopID, opts...) | ([]File, error) | List files on the desktop’s drive. Entries have IsDir: true for directories. |
UploadFile(ctx, desktopID, name, body, contentType, opts...) | (*UploadFileResponse, error) | Upload from any io.Reader; empty contentType sends application/octet-stream. With WithPath, missing intermediate directories are created on the server. |
DownloadFile(ctx, desktopID, name, opts...) | (io.ReadCloser, string, error) | Stream the file body; second return is the response Content-Type. Caller must Close the body. |
Error Handling
All API errors return*APIError, which carries StatusCode and Body:
apiErr.StatusCode to differentiate (401, 404, 409, 5xx).