Help us shape the future of Go! Take the 2026 Go Developer Survey

webui

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package webui is the optional read-only Web UI, embedded in the binary and served inside `ripen daemon`. It is off unless the policy turns it on.

Read-only is structural, not a setting: there is no handler that writes anything. The breaker banner shows the command to clear the breaker as text to copy, because clearing it is a decision an operator makes deliberately at a terminal, with a reason — not a button they can hit while looking at a red box.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadToken

func ReadToken(tokenFile string) (string, error)

ReadToken finds the UI token: the environment first, then the file the policy names.

Types

type Options

type Options struct {
	App     *app.App
	Address string
	// Token guards a non-loopback bind. Empty is allowed only on
	// loopback.
	Token string
}

Options configures the Web UI.

type Server

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

Server is the Web UI.

func New

func New(options Options) (*Server, error)

New builds the Web UI, refusing an exposed bind without a token. There is no insecure escape hatch: if Ripen is reachable from the network, something has to prove it is the operator.

func (*Server) Address

func (s *Server) Address() string

Address is where the UI is listening, useful once a port was chosen for it.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler is the whole surface. Every route reads; none of them write.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(ctx context.Context) error

ListenAndServe runs the UI until the context ends.

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, listener net.Listener) error

Serve runs the UI on an existing listener.

Jump to

Keyboard shortcuts

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