console

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package console serves an embedded operator web console for a broker.

The console is a static single-page app. It holds no broker data of its own: every value it renders is fetched at runtime from the same admin and /v1 endpoints an operator would use with curl, carrying the same bearer token and subject to the same ACL. That keeps a single authorisation path instead of a privileged back door that happens to live in the UI.

Assets are compiled into the binary, so the console needs no build step, no Node toolchain and no files on disk. That matters for the distroless images and for reproducible_build.sh.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppJS

func AppJS() ([]byte, error)

AppJS returns the console's script source. It exists so tests can assert that every endpoint the console calls actually exists, which is otherwise only discoverable by loading the page in a browser.

func Handler

func Handler() http.Handler

Handler returns the console handler. Mount it behind the admin auth wrapper so the console cannot become an unauthenticated window onto broker state:

mux.Handle("/console/", admin.Wrap(console.Handler()))

The handler only ever serves its own embedded bytes, so it reads nothing from the broker and is safe to mount without auth if a deployment prefers to put it behind a separate authenticating proxy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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