board

package
v0.30.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedFS fs.FS = stubFS{}

EmbeddedFS is empty when built without the board frontend. The board UI serves a placeholder page instead.

Functions

func ResolveHome

func ResolveHome(path string) string

ResolveHome expands a leading "~/" to the user's home directory.

Types

type Config

type Config struct {
	Addr           string   // e.g. "127.0.0.1:0" (default), "0.0.0.0:8080"
	ScanDirs       []string // directories to scan for *.sock files, default ["~/.avenor/sockets"]
	Socket         string   // single socket path; if set, ScanDirs is ignored
	AllowMutations bool     // enable POST /api/cancel and POST /api/prompt
	Token          string   // auth token; if empty and NoAuth is false, enforce loopback-only binding
	NoAuth         bool     // skip auth entirely (allows non-loopback without token)
	NoOpen         bool     // don't open browser after starting
}

Config holds the configuration for the board HTTP server.

type Server

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

Server is the board dashboard HTTP server.

func NewServer

func NewServer(cfg Config) (*Server, error)

NewServer creates a board server. If cfg.Token is empty and cfg.NoAuth is false, the bind address must be loopback-only. NoAuth allows non-loopback without any auth — use on trusted networks only.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the actual bound address (e.g. "127.0.0.1:43210").

func (*Server) PrintStartupInfo

func (s *Server) PrintStartupInfo()

PrintStartupInfo prints the URL, token, and auth-protected URL.

func (*Server) Start

func (s *Server) Start() error

Start binds and starts serving in a goroutine.

func (*Server) Stop

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

Stop gracefully shuts down the server.

func (*Server) Token

func (s *Server) Token() string

Token returns the auth token for display.

Jump to

Keyboard shortcuts

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