Infrastructure-as-Code
Go SDK
Official Go SDK for interacting with the Valyent Cloud platform.
Installation
Quick Start
Core Concepts
Client
The main entry point for the SDK is the Client
type. Create a new client and configure it with your API token:
Fleets
Machines
Gateways
Logs and Events
Environment Variables
Deployments
Error Handling
The SDK provides detailed error information through Go’s standard error interface:
Best Practices
-
Context Usage: Use context for operations that might need cancellation or timeouts, especially with streaming logs:
-
Resource Cleanup: Always close resources that implement
io.Closer
: -
Error Checking: Always check errors returned by SDK methods: