server

package
v0.262.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: AGPL-3.0 Imports: 45 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShuttingDown added in v0.244.2

func ShuttingDown() <-chan struct{}

ShuttingDown returns a channel that is closed when the server starts shutting down.

func Start

func Start() error

Start will start the server.

Types

type Config

type Config struct {
	Port                 uint64          `koanf:"port"                 validate:"required,port"`
	Host                 string          `koanf:"host"                 validate:"required,hostname|fqdn|ip"`
	BaseURL              string          `koanf:"baseurl"              validate:"required,url"`
	CompressionLevel     int             `koanf:"compressionlevel"     validate:"number"`
	CompressionMimetypes []string        `koanf:"compressionmimetypes"`
	CertFile             string          `koanf:"crt"                  validate:"omitempty,file"`
	KeyFile              string          `koanf:"key"                  validate:"omitempty,file"`
	ReadTimeout          config.Duration `koanf:"readtimeout"`
	WriteTimeout         config.Duration `koanf:"writetimeout"`
	IdleTimeout          config.Duration `koanf:"idletimeout"`
	BlockSignup          bool            `koanf:"blocksignup"`
	BlockLogin           bool            `koanf:"blocklogin"`
	EnableOTEL           bool            `koanf:"enableotel"`
}

Config contains the server configuration options.

Directories

Path Synopsis
Package handlers contains chainable handlers/middleware for routing.
Package handlers contains chainable handlers/middleware for routing.
Package session contains methods and objects for managing user sessions.
Package session contains methods and objects for managing user sessions.

Jump to

Keyboard shortcuts

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