frontend

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package frontend serves the debug front end of a tracer: the views, the view model behind them, and the HTTP handler that renders HTML for browsers, JSON for tools and plain text for terminals.

Handler builds the handler of a tracer:

handler := frontend.Handler(tracer)

The tracer is an http.Handler serving this front end itself, and the root package mounts it, so a service needs no import of this package.

The package reads the recorded data through the model package alone. The root package imports it to serve the dashboard from the tracer.

The assets live in frontend/assets and are embedded, so the front end makes no external requests: no webfonts, no CDN, no analytics. Rendering failures are reported through Options.OnError like every other failure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(recorder model.Recorder) http.Handler

Handler returns the debug front end handler of one recorder, configured the way that recorder is. It is the shortest path from a tracer to a dashboard, and it is what the tracer's own ServeHTTP builds.

Types

This section is empty.

Directories

Path Synopsis
templ: version: v0.3.1020
templ: version: v0.3.1020

Jump to

Keyboard shortcuts

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