server

package
v1.166.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPort = errors.New("invalid port")

ErrInvalidPort for server.

Functions

func IsEnabled added in v1.143.2

func IsEnabled(c *Config) bool

IsEnabled for server.

func Listener added in v1.145.3

func Listener(port string) (net.Listener, error)

Listener for server.

func UserAgent added in v1.145.0

func UserAgent(c *Config) string

UserAgent for server.

Types

type Config

type Config struct {
	Enabled   bool             `yaml:"enabled,omitempty" json:"enabled,omitempty" toml:"enabled,omitempty"`
	Security  *security.Config `yaml:"security,omitempty" json:"security,omitempty" toml:"security,omitempty"`
	Port      string           `yaml:"port,omitempty" json:"port,omitempty" toml:"port,omitempty"`
	Retry     *retry.Config    `yaml:"retry,omitempty" json:"retry,omitempty" toml:"retry,omitempty"`
	UserAgent string           `yaml:"user_agent,omitempty" json:"user_agent,omitempty" toml:"user_agent,omitempty"`
}

Config for server.

Jump to

Keyboard shortcuts

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