Documentation
¶
Index ¶
Constants ¶
View Source
const ( LabelEnable = "com.caddyserver.http.enable" LabelNetwork = "com.caddyserver.http.network" LabelUpstreamPort = "com.caddyserver.http.upstream.port" )
View Source
const ( LabelMatchProtocol = "com.caddyserver.http.matchers.protocol" LabelMatchHost = "com.caddyserver.http.matchers.host" LabelMatchMethod = "com.caddyserver.http.matchers.method" LabelMatchPath = "com.caddyserver.http.matchers.path" LabelMatchQuery = "com.caddyserver.http.matchers.query" LabelMatchExpression = "com.caddyserver.http.matchers.expression" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Upstreams ¶
type Upstreams struct {
// Labels narrows the containers this source considers to those whose
// Docker labels match. A container is selected only if, for every key,
// its label value equals one of the listed values (keys are ANDed,
// values within a key are ORed). An empty selector matches every
// enabled container.
//
// This selects on container metadata rather than the request, so it can
// distinguish otherwise-identical upstreams — e.g. pin routing to a
// single Compose service via the label it already carries:
//
// label com.docker.compose.service first
Labels map[string][]string `json:"labels,omitempty"`
// Port overrides the upstream port for every container this source
// considers. When set, it takes precedence over the per-container
// com.caddyserver.http.upstream.port label and makes that label optional.
Port string `json:"port,omitempty"`
}
Upstreams provides upstreams from the docker host.
func (Upstreams) CaddyModule ¶
func (Upstreams) CaddyModule() caddy.ModuleInfo
func (*Upstreams) GetUpstreams ¶
Click to show internal directories.
Click to hide internal directories.