api

package
v0.14.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 12 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 `burrow` CLI and `burrow-agent` 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
	// InstallID is this install's own id (ADR-0084 §5): the random, opaque, non-secret identifier
	// `burrow install` generated for it, recorded in a ConfigMap in the control-plane namespace and
	// handed to burrowd in its environment. A caller that names a different install is refused, so a
	// cluster destroyed and recreated under a kube context name a provider generates deterministically
	// is caught on arrival instead of deployed into. Optional — empty (an install predating ids, or a
	// local build) makes the check permissive, since a control plane that does not know its own id
	// cannot establish that a caller is wrong.
	InstallID string
}

Config configures the API handler.

Jump to

Keyboard shortcuts

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