Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package api is the control plane's HTTP front end: it exposes the deploy engine's operations over JSON and authenticates its callers with a bearer token (ADR-0005). It is a thin transport adapter — it decodes requests, calls the engine, and maps the engine's typed outcomes to HTTP status codes; the orchestration and guardrails live in the engine (ADR-0006). The MCP server and the CLI are both clients of this API.

It lives under controlplane/ (not controlplane/internal) so cmd/burrowd and the managed module can wire it; it is licensed Apache-2.0.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (http.Handler, error)

New builds the control-plane HTTP handler. The /v1 routes require the bearer token; /healthz is unauthenticated for liveness probes.

Types

type Config

type Config struct {
	// Engine is the deploy engine the API fronts. Required.
	Engine *controlplane.Engine
	// Token is the bearer token clients must present on every /v1 request
	// (ADR-0005). Required — the control plane authenticates its callers.
	Token string
	// Version is burrowd's own release version, the compatibility anchor for the client-version
	// handshake (ADR-0039): a client more than one minor behind is refused with an actionable error,
	// and an unknown route reports this version so a newer client learns to upgrade the control
	// plane. Optional — empty (a local or e2e build) makes the handshake permissive.
	Version string
}

Config configures the API handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL