Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultShutdownTimeout = 10 * time.Second
Variables ¶
View Source
var Methods = map[string]struct{}{ http.MethodGet: {}, http.MethodPost: {}, http.MethodPut: {}, http.MethodDelete: {}, http.MethodPatch: {}, }
Functions ¶
Types ¶
type Config ¶
type Config struct { Addr string HTTP []ConfigHTTP }
type ConfigHTTP ¶
type ConfigHTTP struct { Domain string Domains []string Addr string Addrs []string HTTPS bool RedirectTrailingSlash *bool `toml:"redirect_trailing_slash"` RedirectFixedPath *bool `toml:"redirect_fixed_path"` Timeout struct { Read Duration ReadHeader Duration Idle Duration Write Duration Shutdown Duration } Min struct { BodySize *int `toml:"body_size"` } Max struct { HeaderSize int `toml:"header_size"` BodySize *int `toml:"body_size"` } Routes []ConfigRoute }
func (ConfigHTTP) GetAddrs ¶
func (h ConfigHTTP) GetAddrs() []string
func (ConfigHTTP) GetDomains ¶
func (h ConfigHTTP) GetDomains() []string
func (ConfigHTTP) GetShutdownTimeout ¶ added in v0.0.5
func (h ConfigHTTP) GetShutdownTimeout() time.Duration
func (ConfigHTTP) Validate ¶
func (h ConfigHTTP) Validate() error
type ConfigRoute ¶
type ConfigRoute struct { Path string Dispatch string Static string // static files Service string Services []string NoCache bool Min struct { BodySize *int `toml:"body_size"` } Max struct { BodySize *int `toml:"body_size"` } }
func (ConfigRoute) GetServices ¶
func (r ConfigRoute) GetServices() []string
func (ConfigRoute) Validate ¶
func (r ConfigRoute) Validate() error
Click to show internal directories.
Click to hide internal directories.