Go SDK
The official Go SDK for Rexec provides a native, type-safe way to interact with Rexec’s Terminal as a Service.Installation
Install usinggo get:
Quick Start
Client Initialization
Basic Client
/home/daytona/workspace/source/sdk/go/rexec.go:36.
Custom HTTP Client
You can provide a custom HTTP client for advanced configuration:SetHTTPClient method at /home/daytona/workspace/source/sdk/go/rexec.go:67.
Container Operations
The Container service provides methods for managing sandboxed environments.List Containers
/home/daytona/workspace/source/sdk/go/rexec.go:168.
Get Container
/home/daytona/workspace/source/sdk/go/rexec.go:175.
Create Container
CreateContainerRequest type is defined at /home/daytona/workspace/source/sdk/go/rexec.go:154.
Start Container
/home/daytona/workspace/source/sdk/go/rexec.go:194.
Stop Container
/home/daytona/workspace/source/sdk/go/rexec.go:199.
Delete Container
/home/daytona/workspace/source/sdk/go/rexec.go:189.
File Operations
Manage files and directories within containers.List Files
/home/daytona/workspace/source/sdk/go/rexec.go:219.
Download File
/home/daytona/workspace/source/sdk/go/rexec.go:227.
Create Directory
/home/daytona/workspace/source/sdk/go/rexec.go:250.
Terminal Operations
Connect to containers via WebSocket for real-time terminal access.Connect to Terminal
/home/daytona/workspace/source/sdk/go/rexec.go:265.
Write to Terminal
Write method is defined at /home/daytona/workspace/source/sdk/go/rexec.go:280.
Read from Terminal
Read method is defined at /home/daytona/workspace/source/sdk/go/rexec.go:285.
Resize Terminal
/home/daytona/workspace/source/sdk/go/rexec.go:291.
Advanced Examples
Run a Script
Interactive Session
Type Definitions
Container
/home/daytona/workspace/source/sdk/go/rexec.go:143.
FileInfo
/home/daytona/workspace/source/sdk/go/rexec.go:204.
Error Handling
APIError type is defined at /home/daytona/workspace/source/sdk/go/rexec.go:133.