Loading…
Loading documentation...
Go SDK — Coming soon; use the REST API v1 or sau CLI today.
Coming soon —
github.com/serversareup/go-sdkis not published today. Use the REST API v1,sauCLI, or MCP server. The remaining snippets are interface sketches only.
# COMING SOON — no github.com/serversareup/go-sdk module is published today.
Requires Go 1.21 or higher.
package main
import (
"context"
"os"
sau "github.com/serversareup/go-sdk"
)
func main() {
client := sau.NewClient(os.Getenv("SAU_API_KEY"))
ctx := context.Background()
// Use client...
}
The future Go client must mirror the accepted REST contract. Instance creation is Coming soon (405 on the collection POST and 501 on deploy POST); config and ISO routes return 501; snapshot creation and backup creation fail closed; clone returns 409; and no block-volume route exists. Resize and rebuild are available today via the REST API. Do not build against matching SDK methods until a package and source-backed route contract are published.
import "errors"
inst, err := client.Instances.Get(ctx, "ins_invalid")
if err != nil {
var notFound *sau.NotFoundError
var rateLimit *sau.RateLimitError
var authErr *sau.AuthError
switch {
case errors.As(err, ¬Found):
fmt.Println("Instance not found")
case errors.As(err, &rateLimit):
fmt.Printf("Rate limited. Retry after %ds\n", rateLimit.RetryAfter)
case errors.As(err, &authErr):
fmt.Println("Invalid API key")
default:
fmt.Printf("Unexpected error: %v\n", err)
}
}
opts := &sau.ListOptions{PerPage: 25}
for {
instances, meta, err := client.Instances.ListPaged(ctx, opts)
if err != nil {
log.Fatal(err)
}
for _, inst := range instances {
fmt.Println(inst.Name)
}
if meta.Page >= meta.TotalPages {
break
}
opts.Page = meta.Page + 1
}
Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.