Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// The primary list of routes to compile and execute.
Routes layer4.RouteList `json:"routes,omitempty"`
// Maximum time connections have to complete the matching phase (the first terminal handler is matched). Default: 3s.
MatchingTimeout caddy.Duration `json:"matching_timeout,omitempty"`
// contains filtered or unexported fields
}
Handler implements a handler that compiles and executes routes. This is useful for a batch of routes that all inherit the same matchers, or for multiple routes that should be treated as a single route.
func (*Handler) CaddyModule ¶
func (*Handler) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Handler) UnmarshalCaddyfile ¶
UnmarshalCaddyfile sets up the Handler from Caddyfile tokens. Syntax:
subroute {
matching_timeout <duration>
@a <matcher> [<matcher_args>]
@b {
<matcher> [<matcher_args>]
<matcher> [<matcher_args>]
}
route @a @b {
<handler> [<handler_args>]
}
@c <matcher> {
<matcher_option> [<matcher_option_args>]
}
route @c {
<handler> [<handler_args>]
<handler> {
<handler_option> [<handler_option_args>]
}
}
}
Click to show internal directories.
Click to hide internal directories.