webserver

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package webserver provides the embedded HTTP server for honey.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthToken

func AuthToken() (string, error)

AuthToken returns a fixed token from the environment when set, or generates a random hex token.

Types

type Options

type Options struct {
	ListenAddr    string // e.g. 127.0.0.1:8765
	Token         string
	ConfigPath    string // optional explicit --config
	Version       string
	Commit        string
	Date          string
	MaxUploadSize int64 // default 100 << 20
}

Options configures the embedded web server.

type Server

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

Server is the honey web UI HTTP server.

func NewServer

func NewServer(opts Options) (*Server, error)

NewServer builds handlers with the given auth token.

func (*Server) Start

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

Start listens and serves until ctx is cancelled.

Jump to

Keyboard shortcuts

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