api

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package api implements the web panel's backend REST API, mounted under /api. It exposes: auth check, config get/update, summary stats, hourly series, model usage, latency percentiles, and the request log + detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetInvalidateCache added in v1.1.0

func SetInvalidateCache(fn func())

SetInvalidateCache wires the cache-invalidation callback from the server package (avoids an api → server import cycle). Called after key mutations.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

API holds dependencies shared by all panel handlers.

func New

func New(cfg *config.Config, st *store.Store) *API

New constructs an API.

func (*API) Mount

func (a *API) Mount(mux *http.ServeMux)

Mount registers the API routes on mux under /api.

Jump to

Keyboard shortcuts

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