api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package api is the composition root's one dependency: an http.Handler satisfying api/openapi.yaml, serving the aggregated dashboard snapshot and the static frontend. It lives under internal/ because the API this service offers is its endpoints, not its Go packages — see go.md's "a server keeps everything in internal/ and its commands in cmd/".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMux

func NewMux(getSnapshot func() dashboard.Snapshot) *http.ServeMux

NewMux wires the handlers registered against api/openapi.yaml: liveness, the aggregated dashboard snapshot, and the static frontend that consumes it. getSnapshot is called fresh on every request, so a request always sees whatever the aggregator most recently assembled — typically (*dashboard.Aggregator).Get.

Types

type Health

type Health struct {
	Status string `json:"status"`
}

Health matches components.schemas.Health in api/openapi.yaml.

Jump to

Keyboard shortcuts

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