ledger

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	handler.Base
	// contains filtered or unexported fields
}

Handler serves GET /api/v1/ledger: the orchestrating agent's declared plan as JSON ({"leases":[...],"overlaps":[...]}), in the order the rows were recorded, so the console's lease drawer can join them to agent activity by lease id.

The overlaps are derived on every read and stored nowhere (types.NewLeaseReport), which is why this handler needs nothing from the store but its rows.

Read-only, and the rows it serves are DECLARATIONS. Nothing magus does is gated on them; the console renders what an agent said it intended, never a verdict magus reached. See types.Lease.

func NewHandler

func NewHandler(src ledgerSource, log *slog.Logger) *Handler

NewHandler returns the GET /api/v1/ledger handler reading from src.

Jump to

Keyboard shortcuts

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