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

api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package api serves the platform runtime API (pkg/runtimeapi): /v1/* for seats, /internal/v1/* for the controller, the optional read-only /console/v1/* for the console, health and metrics. Seat and controller callers use separate credentials and authentication paths (§13.2); every error body is a runtimeapi.Error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) http.Handler

New returns the platform HTTP handler.

Types

type Config

type Config struct {
	Store       *store.Store
	Auth        auth.Authenticator
	Tools       *tools.Registry
	Connections *connections.Manager
	// Credentials delivers sandbox credentials (access profiles).
	Credentials *credentials.Registry
	Metrics     *metrics.Metrics
	Gatherer    prometheus.Gatherer
	Log         *slog.Logger
	// Console registers the read-only console API (/console/v1). It is off
	// unless the platform is started with a console identity.
	Console bool
	// PollInterval is how often a waiting inbox request re-checks the queue.
	PollInterval time.Duration
	// RetirementGrace bounds the wind-down of a seat removed from the
	// declaration before it is retired.
	RetirementGrace time.Duration
}

Config holds the server's dependencies.

Jump to

Keyboard shortcuts

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