Skip to content

The Longbridge Go SDK

A typed Go client over the Longbridge public API — the single wire-truth the CLI and Terraform provider are built on, and the foundation for your own automation.

longbridge-go is a typed Go client over the Console’s public API. It is the single Go wire-truth for the platform: the lbr CLI is built on it, the Terraform provider consumes it, and you can import it directly to build your own automation.

Early access. The module is v0.x and its API may change before it stabilizes. Pin a version.

Install

go get github.com/longbridgehq/longbridge-go

Authenticate

The client authenticates with a Console API key (lngbr_…) — the same credential the CLI and provider use, managed under Account & billing.

package main

import (
	"context"
	"fmt"

	longbridge "github.com/longbridgehq/longbridge-go"
)

func main() {
	c := longbridge.New(longbridge.DefaultEndpoint, "lngbr_…")

	clusters, err := c.ListClusters(context.Background())
	if err != nil {
		panic(err)
	}
	for _, cl := range clusters {
		fmt.Println(cl.Name, cl.Phase)
	}
}

What it covers

The SDK tracks the whole public contract — Control Plane clusters, kubeconfigs, registration tokens, machine users, and the Reliability and Mesh surfaces — and its wire types are regenerated from the published OpenAPI, so it never drifts from what the Console serves.

Next

  • CLI — the same operations, from your terminal.
  • Terraform & OpenTofu — declarative infrastructure on the same contract.