Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpHandler ¶
type HttpHandler struct {
Index index.Index
Mappings HttpHandlerMappings
DefaultHandler http.Handler
}
func (*HttpHandler) ServeHTTP ¶
func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HttpHandlerMapping ¶
httpHandlerMapping is used to route traffic to the correct backend server. Higher weight means that the mapping is more specific and should be matched first.
type HttpHandlerMappings ¶
type HttpHandlerMappings []HttpHandlerMapping
func (HttpHandlerMappings) Sort ¶
func (h HttpHandlerMappings) Sort()
Sort mappings by weight higher weight means that the mapping is more specific and should be matched first Example: /clusters/cluster1/ will be matched before /clusters/ .
type PathMapping ¶
type PathMapping struct {
Path string `json:"path"`
Backend string `json:"backend"`
BackendServerCA string `json:"backend_server_ca"`
ProxyClientCert string `json:"proxy_client_cert"`
ProxyClientKey string `json:"proxy_client_key"`
UserHeader string `json:"user_header,omitempty"`
GroupHeader string `json:"group_header,omitempty"`
ExtraHeaderPrefix string `json:"extra_header_prefix"`
}
PathMapping describes how to route traffic from a path to a backend server. Each Path is registered with the DefaultServeMux with a handler that delegates to the specified backend.
Click to show internal directories.
Click to hide internal directories.