admin

package
v0.0.0-...-efa2a9a Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is the build version, set by the command wrapper.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Listen defaults to loopback. This surface can create tenants, read the
	// audit log and change routing — it is an operator tool, not a public one.
	Listen string `yaml:"listen"`

	PolicyDB   string `yaml:"policy_db"`
	BaseDomain string `yaml:"base_domain"`
	BrandName  string `yaml:"brand_name"`

	// ResolverAdmin is the resolver's admin API, used for live status: cache
	// size, upstream health, blocklist size and uptime.
	ResolverAdmin string `yaml:"resolver_admin"`
	ResolverToken string `yaml:"resolver_token"`

	SessionTTL    time.Duration `yaml:"session_ttl"`
	SecureCookies bool          `yaml:"secure_cookies"`

	TrustedProxies []string `yaml:"trusted_proxies"`

	RateLimitQPS   float64 `yaml:"rate_limit_qps"`
	RateLimitBurst int     `yaml:"rate_limit_burst"`

	MaxLoginFailures int           `yaml:"max_login_failures"`
	LoginWindow      time.Duration `yaml:"login_window"`

	LogLevel  string `yaml:"log_level"`
	LogFormat string `yaml:"log_format"`
}

Config is the dashboard's configuration.

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Server

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

Server is the operator dashboard.

func New

func New(cfg Config, log *slog.Logger) (*Server, error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) Handler

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

Handler builds the routing table.

func (*Server) Policy

func (s *Server) Policy() resolver.Store

func (*Server) Serve

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

Serve runs the dashboard until ctx is cancelled.

func (*Server) Store

func (s *Server) Store() *backend.Store

Jump to

Keyboard shortcuts

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