server

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeWebsocket = "websocket"
	TypeQuic      = "quic"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.6.0

type Config struct {
	Type             string   `toml:"type"` // support websocket and quic
	Host             string   `toml:"host"`
	Path             string   `toml:"path"`
	ListenAddr       string   `toml:"listen_addr"`
	Key              string   `toml:"key"`
	Crt              string   `toml:"crt"`
	WebRoot          string   `toml:"web_root"`
	WebKey           string   `toml:"web_key"`
	WebCrt           string   `toml:"web_crt"`
	WebHost          string   `toml:"web_host"`
	Timeout          Duration `toml:"timeout"`
	Secret           string   `toml:"secret"`
	Period           uint     `toml:"period"`
	ReverseProxyHost string   `toml:"reverse_proxy_host"`
	ReverseProxyKey  string   `toml:"reverse_proxy_key"`
	ReverseProxyCrt  string   `toml:"reverse_proxy_crt"`
	ReverseProxyAddr string   `toml:"reverse_proxy_addr"`
	Pprof            string   `toml:"pprof"`
}

func New

func New(path string) (Config, error)

type Duration added in v0.10.0

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalText added in v0.10.0

func (d *Duration) UnmarshalText(text []byte) (err error)

Jump to

Keyboard shortcuts

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