Overview
The OpenShell Go SDK exposes typed interfaces through the sub-client pattern.
You access each interface through a typed accessor on the concrete Client.
Interface Summary
Section titled “Interface Summary”Top-Level Interfaces
Section titled “Top-Level Interfaces”| Interface | Accessor | Description |
|---|---|---|
| SandboxInterface | client.Sandboxes() |
Create, manage, and watch sandbox lifecycle |
| SandboxTemplateInterface | client.SandboxTemplates() |
Manage reusable sandbox templates |
| ExecInterface | client.Exec() |
Run commands, stream output, interactive sessions |
| ProviderInterface | client.Providers() |
Manage compute providers and their lifecycle |
| ServiceInterface | client.Services() |
Expose and manage HTTP services inside sandboxes |
| FileInterface | client.Files() |
Upload and download files to/from sandboxes |
| HealthInterface | client.Health() |
Check gateway health status |
| SSHInterface | client.SSH() |
Create SSH sessions and tunnels to sandboxes |
| TCPInterface | client.TCP() |
Forward TCP connections to sandbox ports |
| ConfigInterface | client.Config() |
Read and update sandbox and gateway configuration |
| PolicyInterface | client.Policy() |
Manage draft policy recommendations |
Convenience Packages
Section titled “Convenience Packages”| Package | Entry Point | Description |
|---|---|---|
| gateway | gateway.NewClient(name) |
Read CLI gateway configs and auto-wire clients |
Provider Sub-Interfaces
Section titled “Provider Sub-Interfaces”These are accessed through client.Providers():
| Interface | Accessor | Description |
|---|---|---|
| ProfileInterface | client.Providers().Profiles() |
Manage provider type profiles |
| RefreshInterface | client.Providers().Refresh() |
Configure credential refresh strategies |
Interfaces
Section titled “Interfaces”Each interface has a reference page with method signatures and usage examples:
- Sandboxes: Create sandboxes, wait for readiness, watch state changes, manage providers, retrieve logs.
- Sandbox Templates: Create reusable workload templates and launch sandboxes from them.
- Exec: Execute commands with one-shot, streaming, or interactive modes.
- Providers: Register and manage compute providers. Includes sub-clients for profiles and credential refresh.
- Services: Expose and manage HTTP services inside sandboxes.
- Files: Upload and download files to/from sandboxes.
- Health: Check gateway health status.
- SSH: Create SSH sessions and tunnels to sandboxes.
- TCP: Forward TCP connections to sandbox ports.
- Config: Read and update sandbox and gateway configuration.
- Policy: Manage draft policy recommendations.
- Profiles: Manage provider type profiles (via
client.Providers().Profiles()). - Refresh: Configure credential refresh strategies (via
client.Providers().Refresh()).
Common Patterns
Section titled “Common Patterns”SDK methods follow these conventions:
- Network operations take
context.Context; list constructors return a pager, and eachNextPagecall accepts the request context - Methods that can fail return
(result, error) - List methods accept variadic options and
ListAllis the explicit exhaustive path - Errors from the gateway carry a
StatusErrorwith a typed code (see Error Handling)
We are a Cloud Native Computing Foundation sandbox project.
Copyright OpenShell a Series of LF Projects, LLC
For website terms of use, trademark policy and other project policies please see lfprojects.org/policies/.