Documentation
¶
Index ¶
- Constants
- Variables
- type AccessConfig
- type Acme
- type AcmeCerts
- type AcmeData
- type AcmeStorages
- func (c *AcmeStorages) Acquire(name string) *AcmeCerts
- func (c *AcmeStorages) BuildAcmeStorages() []string
- func (c *AcmeStorages) BuildAcmeStoragesAdd() []string
- func (c *AcmeStorages) BuildAcmeStoragesDel() []string
- func (c *AcmeStorages) Commit()
- func (c *AcmeStorages) RemoveAll(names []string)
- func (c *AcmeStorages) Updated() bool
- type AgentCheck
- type AuthExternal
- type AuthHTTP
- type AuthProxy
- type AuthProxyBind
- type Backend
- func (b *Backend) AcquireEndpoint(ip string, port int, targetRef string) *Endpoint
- func (b *Backend) AddBackendPath(link *PathLink) *BackendPath
- func (b *Backend) AddEmptyEndpoint() *Endpoint
- func (b *Backend) AddEndpoint(ip string, port int, targetRef string) *Endpoint
- func (b *Backend) BackendID() BackendID
- func (b *Backend) CookieAffinity() bool
- func (b *Backend) FindBackendPath(link *PathLink) *BackendPath
- func (b *Backend) FindEndpoint(target string) *Endpoint
- func (b *Backend) HasCorsEnabled() bool
- func (b *Backend) HasHSTS() bool
- func (b *Backend) HasModsec() bool
- func (b *Backend) HasSSLRedirect() bool
- func (b *Backend) HasSSLRedirectPaths(paths []*BackendPath) bool
- func (b *Backend) Hostnames() []string
- func (b *Backend) NeedACL() bool
- func (b *Backend) PathConfig(attr string) *BackendPathConfig
- type BackendHeader
- type BackendID
- type BackendLimit
- type BackendPath
- type BackendPathConfig
- type BackendPathItem
- type BackendTLSConfig
- type BackendTimeoutConfig
- type Backends
- func (b *Backends) AcquireAuthBackend(ipList []string, port int, hostname string) *Backend
- func (b *Backends) AcquireBackend(namespace, name, port string) *Backend
- func (b *Backends) BackendChanged(backend *Backend)
- func (b *Backends) BuildHTTPResponses() (responses []HTTPResponses)
- func (b *Backends) BuildSortedItems() []*Backend
- func (b *Backends) BuildSortedShard(shardRef int) []*Backend
- func (b *Backends) BuildUsedAuthBackends() map[string]bool
- func (b *Backends) Changed() bool
- func (b *Backends) ChangedShards() []int
- func (b *Backends) Clear()
- func (b *Backends) Commit()
- func (b *Backends) FillSourceIPs()
- func (b *Backends) FindBackend(namespace, name, port string) *Backend
- func (b *Backends) FindBackendID(backendID BackendID) *Backend
- func (b *Backends) Items() map[string]*Backend
- func (b *Backends) ItemsAdd() map[string]*Backend
- func (b *Backends) ItemsDel() map[string]*Backend
- func (b *Backends) RemoveAll(backendID []string)
- func (b *Backends) Shrink()
- func (b *Backends) ShuffleAllEndpoints()
- func (b *Backends) SortChangedEndpoints(sortBy string)
- type BlueGreenConfig
- type CAVerify
- type Cookie
- type CookieConfig
- type Cors
- type DHParamConfig
- type DNSConfig
- type DNSNameserver
- type DNSResolver
- type DrainConfig
- type DynBackendConfig
- type Endpoint
- type EndpointCookieStrategy
- type EndpointNaming
- type ExternalConfig
- type Frontend
- func (f *Frontend) AcquireAuthBackendName(backend BackendID) (authBackendName string, err error)
- func (f *Frontend) Changed() bool
- func (f *Frontend) Commit()
- func (f *Frontend) RemoveAuthBackendByTarget(backends []string)
- func (f *Frontend) RemoveAuthBackendExcept(used map[string]bool)
- func (f *Frontend) String() string
- type FrontendMaps
- type Global
- type GlobalBindConfig
- type HSTS
- type HTTPHeader
- type HTTPHeaderMatch
- type HTTPMatch
- type HTTPResponse
- type HTTPResponses
- type HealthCheck
- type HealthzConfig
- type Host
- func (h *Host) AddLink(backend *Backend, link *PathLink) *PathLink
- func (h *Host) AddLinkRedirect(link *PathLink, redirTo string) *PathLink
- func (h *Host) AddPath(backend *Backend, path string, match MatchType) *HostPath
- func (h *Host) AddRedirect(path string, match MatchType, redirTo string)
- func (h *Host) FindPath(path string, match ...MatchType) (paths []*HostPath)
- func (h *Host) FindPathWithLink(link *PathLink) (path *HostPath)
- func (h *Host) HasTLS() bool
- func (h *Host) HasTLSAuth() bool
- func (h *Host) RemovePath(hpath *HostPath)
- func (h *Host) SSLPassthrough() bool
- func (h *Host) SetSSLPassthrough(value bool)
- func (h *Host) String() string
- type HostAliasConfig
- type HostBackend
- type HostPath
- type HostRedirectConfig
- type HostResolver
- type HostTLSConfig
- type Hosts
- func (h *Hosts) AcquireHost(hostname string) *Host
- func (h *Hosts) BuildHTTPResponses() (responses []HTTPResponses)
- func (h *Hosts) BuildSortedItems() []*Host
- func (h *Hosts) Changed() bool
- func (h *Hosts) Commit()
- func (h *Hosts) DefaultHost() *Host
- func (h *Hosts) FindHost(hostname string) *Host
- func (h *Hosts) FindTargetRedirect(redirfrom string, isRegex bool) *Host
- func (h *Hosts) HasCommit() bool
- func (h *Hosts) HasSSLPassthrough() bool
- func (h *Hosts) HasTLSAuth() bool
- func (h *Hosts) HasVarNamespace() bool
- func (h *Hosts) Items() map[string]*Host
- func (h *Hosts) ItemsAdd() map[string]*Host
- func (h *Hosts) ItemsDel() map[string]*Host
- func (h *Hosts) RemoveAll(hostnames []string)
- func (h *Hosts) Shrink()
- type HostsMap
- func (hm *HostsMap) AddAliasPathMapping(alias HostAliasConfig, path *HostPath, target string)
- func (hm *HostsMap) AddHostnameMapping(hostname, target string)
- func (hm *HostsMap) AddHostnameMappingRegex(hostname, target string)
- func (hm *HostsMap) AddHostnamePathMapping(hostname string, hostPath *HostPath, target string)
- func (hm *HostsMap) HasHost() bool
- func (hm *HostsMap) MatchFiles() []*MatchFile
- type HostsMapEntry
- type HostsMaps
- type MasterConfig
- type MatchFile
- type MatchType
- type ModSecurityConfig
- type ModSecurityTimeoutConfig
- type PathLink
- func (l *PathLink) AddHeadersMatch(headers HTTPHeaderMatch) *PathLink
- func (l *PathLink) ComposeMatch() bool
- func (l *PathLink) Equals(other *PathLink) bool
- func (l *PathLink) HAMatch() string
- func (l *PathLink) Hash() PathLinkHash
- func (l *PathLink) Hostname() string
- func (l *PathLink) IsDefaultHost() bool
- func (l *PathLink) IsEmpty() bool
- func (l *PathLink) Key() string
- func (l *PathLink) Less(other *PathLink, reversePath bool) bool
- func (l *PathLink) WithHeadersMatch(headers HTTPHeaderMatch) *PathLink
- func (l *PathLink) WithHostname(hostname string) *PathLink
- type PathLinkHash
- type PeersConfig
- type PeersServer
- type PeersTable
- type ProcsConfig
- type PromConfig
- type RewriteConfig
- type SSLConfig
- type SecurityConfig
- type ServerConfig
- type StatsConfig
- type SyslogConfig
- type TCPBackend
- type TCPBackends
- type TCPEndpoint
- type TCPProxyProt
- type TCPSSL
- type TCPServiceHost
- type TCPServicePort
- func (s *TCPServicePort) BuildSortedItems() []*TCPServiceHost
- func (s *TCPServicePort) BuildSortedTLSConfig() []*TCPServiceTLSConfig
- func (s *TCPServicePort) DefaultHost() *TCPServiceHost
- func (s *TCPServicePort) HasTLS() bool
- func (s *TCPServicePort) Hosts() map[string]*TCPServiceHost
- func (s *TCPServicePort) Port() int
- type TCPServiceTLSConfig
- type TCPServices
- func (s *TCPServices) AcquireTCPService(service string) (*TCPServicePort, *TCPServiceHost)
- func (s *TCPServices) BuildSortedItems() []*TCPServicePort
- func (s *TCPServices) Changed() bool
- func (s *TCPServices) Commit()
- func (s *TCPServices) FindTCPPort(port int) *TCPServicePort
- func (s *TCPServices) Items() map[int]*TCPServicePort
- func (s *TCPServices) RemoveAll(services []string)
- func (s *TCPServices) RemoveService(service string)
- type TLSConfig
- type TimeoutConfig
- type User
- type Userlist
- type UserlistConfig
- type Userlists
- type WAF
Constants ¶
const ( MatchBegin = MatchType("begin") MatchExact = MatchType("exact") MatchPrefix = MatchType("prefix") MatchRegex = MatchType("regex") )
...
const DefaultHost = "<default>"
DefaultHost ...
const HTTPResponseGlobalID = "global"
const PeersGroupNameGlobal = "global"
const PeersTableNamePrefix = "_peers_"
Variables ¶
var DefaultMatchOrder = []MatchType{MatchExact, MatchPrefix, MatchBegin, MatchRegex}
DefaultMatchOrder ...
Functions ¶
This section is empty.
Types ¶
type AccessConfig ¶ added in v0.12.1
AccessConfig ...
type AcmeCerts ¶ added in v0.11.1
type AcmeCerts struct {
// contains filtered or unexported fields
}
AcmeCerts ...
func (*AcmeCerts) AddDomains ¶ added in v0.11.1
AddDomains ...
func (*AcmeCerts) AssignPreferredChain ¶ added in v0.13.5
AssignPreferredChain ...
type AcmeData ¶ added in v0.9.1
type AcmeData struct {
Emails string
Endpoint string
Expiring time.Duration
TermsAgreed bool
// contains filtered or unexported fields
}
AcmeData ...
func (*AcmeData) Storages ¶ added in v0.11.1
func (acme *AcmeData) Storages() *AcmeStorages
Storages ...
type AcmeStorages ¶ added in v0.11.1
type AcmeStorages struct {
// contains filtered or unexported fields
}
AcmeStorages ...
func (*AcmeStorages) Acquire ¶ added in v0.11.1
func (c *AcmeStorages) Acquire(name string) *AcmeCerts
Acquire ...
func (*AcmeStorages) BuildAcmeStorages ¶ added in v0.11.1
func (c *AcmeStorages) BuildAcmeStorages() []string
BuildAcmeStorages ...
func (*AcmeStorages) BuildAcmeStoragesAdd ¶ added in v0.11.1
func (c *AcmeStorages) BuildAcmeStoragesAdd() []string
BuildAcmeStoragesAdd ...
func (*AcmeStorages) BuildAcmeStoragesDel ¶ added in v0.11.1
func (c *AcmeStorages) BuildAcmeStoragesDel() []string
BuildAcmeStoragesDel ...
func (*AcmeStorages) RemoveAll ¶ added in v0.11.1
func (c *AcmeStorages) RemoveAll(names []string)
RemoveAll ...
type AgentCheck ¶
AgentCheck ...
type AuthExternal ¶ added in v0.13.0
type AuthExternal struct {
AllowedPath string
AlwaysDeny bool
AuthBackendName string
AuthPath string
HeadersFail []string
HeadersRequest []string
HeadersSucceed []string
HeadersVars map[string]string
Method string
RedirectOnFail string
}
AuthExternal ...
type AuthProxy ¶ added in v0.13.0
type AuthProxy struct {
BindList []*AuthProxyBind
Name string
RangeEnd int
RangeStart int
}
AuthProxy ...
type AuthProxyBind ¶ added in v0.13.0
AuthProxyBind ...
type Backend ¶
type Backend struct {
ID string
Namespace string
Name string
Port string
DNSPort string
SourceIPs []net.IP
Endpoints []*Endpoint
EpNaming EndpointNaming
//
// Paths
//
Paths []*BackendPath
PathsMap *HostsMap
PathsDefaultHostMap *HostsMap
//
// per backend config
//
AgentCheck AgentCheck
AllowedIPTCP AccessConfig
BalanceAlgorithm string
BlueGreen BlueGreenConfig
Cookie Cookie
CustomConfigEarly []string
CustomConfigLate []string
CustomHTTPResponses HTTPResponses
DeniedIPTCP AccessConfig
Dynamic DynBackendConfig
EpCookieStrategy EndpointCookieStrategy
Headers []*BackendHeader
HealthCheck HealthCheck
Limit BackendLimit
ModeTCP bool
PeersTable string
Resolver string
Server ServerConfig
Timeout BackendTimeoutConfig
TLS BackendTLSConfig
// contains filtered or unexported fields
}
Backend ...
func (*Backend) AcquireEndpoint ¶
AcquireEndpoint ...
func (*Backend) AddBackendPath ¶ added in v0.11.1
func (b *Backend) AddBackendPath(link *PathLink) *BackendPath
AddBackendPath ...
func (*Backend) AddEmptyEndpoint ¶
AddEmptyEndpoint ...
func (*Backend) AddEndpoint ¶ added in v0.14.8
func (*Backend) CookieAffinity ¶ added in v0.12.1
CookieAffinity ...
func (*Backend) FindBackendPath ¶ added in v0.11.1
func (b *Backend) FindBackendPath(link *PathLink) *BackendPath
FindBackendPath ...
func (*Backend) FindEndpoint ¶
FindEndpoint ...
func (*Backend) HasSSLRedirectPaths ¶
func (b *Backend) HasSSLRedirectPaths(paths []*BackendPath) bool
HasSSLRedirectPaths ...
func (*Backend) PathConfig ¶ added in v0.12.1
func (b *Backend) PathConfig(attr string) *BackendPathConfig
PathConfig ...
type BackendHeader ¶ added in v0.11.1
BackendHeader ...
type BackendID ¶ added in v0.11.1
type BackendID struct {
Namespace string
Name string
Port string
// contains filtered or unexported fields
}
BackendID ...
type BackendLimit ¶
BackendLimit ...
type BackendPath ¶
type BackendPath struct {
//
// core fields, filter out new fields in `Backend.createPathConfig()`
//
ID string
Link *PathLink
Host HostResolver
//
// config fields
//
AllowedIPHTTP AccessConfig
AuthHTTP AuthHTTP
AuthExternal AuthExternal
Cors Cors
DeniedIPHTTP AccessConfig
HSTS HSTS
MaxBodySize int64
Rewrite RewriteConfig
SSLRedirect bool
WAF WAF
}
BackendPath ...
func (*BackendPath) IsDefaultHost ¶ added in v0.12.4
func (p *BackendPath) IsDefaultHost() bool
IsDefaultHost ...
type BackendPathConfig ¶ added in v0.12.1
type BackendPathConfig struct {
// contains filtered or unexported fields
}
BackendPathConfig ...
func (*BackendPathConfig) Items ¶ added in v0.12.1
func (b *BackendPathConfig) Items() []interface{}
Items ...
func (*BackendPathConfig) NeedACL ¶ added in v0.12.1
func (b *BackendPathConfig) NeedACL() bool
NeedACL ...
func (*BackendPathConfig) PathIDs ¶ added in v0.12.1
func (b *BackendPathConfig) PathIDs(index int) []string
PathIDs ...
func (*BackendPathConfig) Paths ¶ added in v0.12.1
func (b *BackendPathConfig) Paths(index int) []*BackendPath
Paths ...
type BackendPathItem ¶ added in v0.12.1
type BackendPathItem struct {
// contains filtered or unexported fields
}
BackendPathItem ...
type BackendTLSConfig ¶
type BackendTLSConfig struct {
AddCertHeader bool
FingerprintLower bool
HasTLSAuth bool
Sha2Bits int
}
BackendTLSConfig ...
type BackendTimeoutConfig ¶
type BackendTimeoutConfig struct {
Connect string
HTTPRequest string
KeepAlive string
Queue string
Server string
ServerFin string
Tunnel string
}
BackendTimeoutConfig ...
type Backends ¶ added in v0.11.1
type Backends struct {
DefaultBackend *Backend
// contains filtered or unexported fields
}
Backends ...
func CreateBackends ¶ added in v0.11.1
CreateBackends ...
func (*Backends) AcquireAuthBackend ¶ added in v0.13.0
AcquireAuthBackend ...
func (*Backends) AcquireBackend ¶ added in v0.11.1
AcquireBackend ...
func (*Backends) BackendChanged ¶ added in v0.11.9
BackendChanged ...
func (*Backends) BuildHTTPResponses ¶ added in v0.16.0
func (b *Backends) BuildHTTPResponses() (responses []HTTPResponses)
func (*Backends) BuildSortedItems ¶ added in v0.11.1
BuildSortedItems ...
func (*Backends) BuildSortedShard ¶ added in v0.11.1
BuildSortedShard ...
func (*Backends) BuildUsedAuthBackends ¶ added in v0.13.0
BuildUsedAuthBackends ...
func (*Backends) ChangedShards ¶ added in v0.11.1
ChangedShards ...
func (*Backends) FillSourceIPs ¶ added in v0.13.0
func (b *Backends) FillSourceIPs()
FillSourceIPs ...
func (*Backends) FindBackend ¶ added in v0.11.1
FindBackend ...
func (*Backends) FindBackendID ¶ added in v0.11.1
FindBackendID ...
func (*Backends) Shrink ¶ added in v0.11.1
func (b *Backends) Shrink()
Shrink compares deleted and added backends with the same name - ie changed objects - and remove both from the changing hashmap tracker when they match.
func (*Backends) ShuffleAllEndpoints ¶ added in v0.11.1
func (b *Backends) ShuffleAllEndpoints()
ShuffleAllEndpoints ...
func (*Backends) SortChangedEndpoints ¶ added in v0.11.1
SortChangedEndpoints ...
type BlueGreenConfig ¶ added in v0.9.1
BlueGreenConfig ...
type Cookie ¶
type Cookie struct {
Name string
Domain string
Dynamic bool
Preserve bool
SameSite bool
Strategy string
Keywords string
}
Cookie ...
type Cors ¶
type Cors struct {
Enabled bool
//
AllowCredentials bool
AllowHeaders string
AllowMethods string
AllowOrigin []string
AllowOriginRegex []string
ExposeHeaders string
MaxAge int
}
Cors ...
type DHParamConfig ¶
DHParamConfig ...
type DNSConfig ¶
type DNSConfig struct {
ClusterDomain string
Resolvers []*DNSResolver
}
DNSConfig ...
type DNSNameserver ¶
DNSNameserver ...
func (*DNSNameserver) String ¶
func (dns *DNSNameserver) String() string
type DNSResolver ¶
type DNSResolver struct {
Name string
Nameservers []*DNSNameserver
AcceptedPayloadSize int
HoldObsolete string
HoldValid string
TimeoutRetry string
}
DNSResolver ...
func (*DNSResolver) String ¶
func (dns *DNSResolver) String() string
type DynBackendConfig ¶
DynBackendConfig ...
type Endpoint ¶
type Endpoint struct {
Enabled bool
Label string
IP string
Name string
Port int
SourceIP string
Target string
TargetRef string
Weight int
CookieValue string
PUID int32 // Proxy Unique ID, referenced as "id" in haproxy server lines
}
Endpoint ...
type EndpointCookieStrategy ¶ added in v0.12.1
type EndpointCookieStrategy int
EndpointCookieStrategy ...
const ( EpCookieName EndpointCookieStrategy = iota EpCookiePodUID )
...
type EndpointNaming ¶
type EndpointNaming int
EndpointNaming ...
const ( EpSequence EndpointNaming = iota EpIPPort EpTargetRef )
...
type ExternalConfig ¶ added in v0.12.1
ExternalConfig ...
type Frontend ¶
type Frontend struct {
Maps *FrontendMaps
Name string
BindName string
BindSocket string
BindID int
AcceptProxy bool
AuthProxy AuthProxy
//
DefaultCrtFile string
DefaultCrtHash string
CrtListFile string
//
RedirectFromCode int
RedirectToCode int
// contains filtered or unexported fields
}
Frontend ...
func (*Frontend) AcquireAuthBackendName ¶ added in v0.13.0
AcquireAuthBackendName ...
func (*Frontend) RemoveAuthBackendByTarget ¶ added in v0.13.0
RemoveAuthBackendByTarget ...
func (*Frontend) RemoveAuthBackendExcept ¶ added in v0.13.0
RemoveAuthBackendExcept ...
type FrontendMaps ¶ added in v0.11.1
type FrontendMaps struct {
HTTPHostMap *HostsMap
HTTPSHostMap *HostsMap
//
RedirFromRootMap *HostsMap
RedirRootSSLMap *HostsMap
RedirFromMap *HostsMap
RedirToMap *HostsMap
SSLPassthroughMap *HostsMap
VarNamespaceMap *HostsMap
//
TLSAuthList *HostsMap
TLSNeedCrtList *HostsMap
TLSInvalidCrtPagesMap *HostsMap
TLSMissingCrtPagesMap *HostsMap
//
DefaultHostMap *HostsMap
}
FrontendMaps ...
type Global ¶
type Global struct {
Bind GlobalBindConfig
Procs ProcsConfig
Syslog SyslogConfig
MaxConn int
Timeout TimeoutConfig
SSL SSLConfig
DNS DNSConfig
ModSecurity ModSecurityConfig
Cookie CookieConfig
DrainSupport DrainConfig
Acme Acme
ForwardFor string
OriginalForwardedForHdr string
RealIPHdr string
LoadServerState bool
AdminSocket string
LocalFSPrefix string
External ExternalConfig
Healthz HealthzConfig
Master MasterConfig
MatchOrder []MatchType
Peers PeersConfig
Prometheus PromConfig
Security SecurityConfig
Stats StatsConfig
CloseSessionsDuration time.Duration
TimeoutStopDuration time.Duration
StrictHost bool
FastCGIApps []string
UseHTX bool
DefaultBackendRedir string
DefaultBackendRedirCode int
NoRedirects []string
CustomConfig []string
CustomDefaults []string
CustomFrontendEarly []string
CustomFrontendLate []string
CustomPeers []string
CustomProxy map[string][]string
CustomHTTPResponses HTTPResponses
CustomSections []string
CustomTCP []string
}
Global ...
type GlobalBindConfig ¶
type GlobalBindConfig struct {
AcceptProxy bool
HTTPBind string
HTTPSBind string
TCPBindIP string
FrontingBind string
FrontingSockID int
FrontingUseProto bool
}
GlobalBindConfig ...
func (GlobalBindConfig) HasFrontingProxy ¶
func (b GlobalBindConfig) HasFrontingProxy() bool
HasFrontingProxy ...
func (GlobalBindConfig) ShareHTTPPort ¶
func (b GlobalBindConfig) ShareHTTPPort() bool
ShareHTTPPort ...
type HTTPHeader ¶ added in v0.14.0
HTTPHeader ...
type HTTPMatch ¶ added in v0.15.0
type HTTPMatch struct {
// Each HTTPMatch uses 16 + len(Name) + len(Value) + 7 (if Regex) bytes.
// Keyword and converter uses about 120 bytes.
//
// Three HTTPMatch whose Name has 24 bytes and Value has 256 bytes will consume:
// 3 * (16 + 24 + 256) + 120 = 1008, or 1029 if Regex is true
//
// This should be below 2048.
Regex bool
Name string
Value string
}
HTTPMatch ...
type HTTPResponse ¶ added in v0.14.0
type HTTPResponse struct {
Name string
Headers []HTTPHeader
Body []string
StatusCode int
StatusReason string
}
HTTPResponse ...
type HTTPResponses ¶ added in v0.16.0
type HTTPResponses struct {
ID string
HAProxy []HTTPResponse
Lua []HTTPResponse
}
HTTPResponses ...
type HealthCheck ¶
type HealthCheck struct {
Addr string
FallCount int
Interval string
Port int
RiseCount int
URI string
}
HealthCheck ...
type Host ¶
type Host struct {
Hostname string
Paths []*HostPath
//
Alias HostAliasConfig
CustomHTTPResponses HTTPResponses
Redirect HostRedirectConfig
HTTPPassthroughBackend string
RootRedirect string
TLS HostTLSConfig
VarNamespace bool
// contains filtered or unexported fields
}
Host ...
Wildcard `*` hostname is a catch all and will be used if no other hostname, alias or regex matches the request. If wildcard hostname is not declared, the default backend will be used. If the default backend is empty, a default 404 page generated by HAProxy will be used.
func (*Host) AddLinkRedirect ¶ added in v0.15.0
AddLinkRedirect ...
func (*Host) AddRedirect ¶ added in v0.13.0
AddRedirect ...
func (*Host) FindPathWithLink ¶ added in v0.15.0
FindPathWithLink ...
func (*Host) RemovePath ¶ added in v0.13.0
RemovePath ...
func (*Host) SetSSLPassthrough ¶ added in v0.11.1
SetSSLPassthrough ...
type HostAliasConfig ¶
HostAliasConfig ...
type HostBackend ¶
HostBackend ...
type HostPath ¶
type HostPath struct {
Link *PathLink
AuthExt *AuthExternal
Backend HostBackend
RedirTo string
// contains filtered or unexported fields
}
HostPath ...
Root context `/` path is a catch all and will be used if no other path matches the request on this host. If a root context path is not declared, the default backend will be used. If the default backend is empty, a default 404 page generated by HAProxy will be used.
func (*HostPath) Headers ¶ added in v0.15.0
func (h *HostPath) Headers() HTTPHeaderMatch
Headers ...
type HostRedirectConfig ¶ added in v0.13.0
HostRedirectConfig ...
type HostTLSConfig ¶
HostTLSConfig ...
type Hosts ¶ added in v0.11.1
type Hosts struct {
// contains filtered or unexported fields
}
Hosts ...
func (*Hosts) AcquireHost ¶ added in v0.11.1
AcquireHost ...
func (*Hosts) BuildHTTPResponses ¶ added in v0.16.0
func (h *Hosts) BuildHTTPResponses() (responses []HTTPResponses)
func (*Hosts) BuildSortedItems ¶ added in v0.11.1
BuildSortedItems ...
func (*Hosts) FindTargetRedirect ¶ added in v0.13.0
FindTargetRedirect ...
func (*Hosts) HasSSLPassthrough ¶ added in v0.11.1
HasSSLPassthrough ...
func (*Hosts) HasVarNamespace ¶ added in v0.11.1
HasVarNamespace ...
type HostsMap ¶
type HostsMap struct {
// contains filtered or unexported fields
}
HostsMap ...
func (*HostsMap) AddAliasPathMapping ¶ added in v0.11.1
func (hm *HostsMap) AddAliasPathMapping(alias HostAliasConfig, path *HostPath, target string)
AddAliasPathMapping ...
func (*HostsMap) AddHostnameMapping ¶ added in v0.11.1
AddHostnameMapping ...
func (*HostsMap) AddHostnameMappingRegex ¶ added in v0.13.0
AddHostnameMappingRegex ...
func (*HostsMap) AddHostnamePathMapping ¶ added in v0.11.1
AddHostnamePathMapping ...
func (*HostsMap) MatchFiles ¶ added in v0.11.2
MatchFiles ...
type HostsMapEntry ¶
HostsMapEntry ...
func (*HostsMapEntry) String ¶ added in v0.11.1
func (he *HostsMapEntry) String() string
type HostsMaps ¶
type HostsMaps struct {
Items []*HostsMap
// contains filtered or unexported fields
}
HostsMaps ...
type MasterConfig ¶ added in v0.12.1
MasterConfig ...
type MatchFile ¶ added in v0.11.2
type MatchFile struct {
// contains filtered or unexported fields
}
MatchFile ...
func (MatchFile) Headers ¶ added in v0.15.0
func (m MatchFile) Headers() HTTPHeaderMatch
Headers ...
type ModSecurityConfig ¶
type ModSecurityConfig struct {
Endpoints []string
Timeout ModSecurityTimeoutConfig
Args []string
UseCoraza bool
}
ModSecurityConfig ...
type ModSecurityTimeoutConfig ¶
type ModSecurityTimeoutConfig struct {
// Backend
Connect string
Server string
// SPOE
Hello string
Idle string
Processing string
}
ModSecurityTimeoutConfig ...
type PathLink ¶ added in v0.11.1
type PathLink struct {
// contains filtered or unexported fields
}
PathLink is a unique identifier of a request configuration. Several request based configurations uses this identifier to distinguish if an acl should or should not be applied.
func CreateHostPathLink ¶ added in v0.15.0
CreateHostPathLink ...
func CreatePathLink ¶ added in v0.11.1
CreatePathLink ...
func (*PathLink) AddHeadersMatch ¶ added in v0.15.0
func (l *PathLink) AddHeadersMatch(headers HTTPHeaderMatch) *PathLink
AddHeadersMatch ...
func (*PathLink) ComposeMatch ¶ added in v0.15.0
ComposeMatch returns true if the pathLink has composing match, by adding method, header or cookie match.
func (*PathLink) IsDefaultHost ¶ added in v0.12.4
IsDefaultHost ...
func (*PathLink) WithHeadersMatch ¶ added in v0.15.0
func (l *PathLink) WithHeadersMatch(headers HTTPHeaderMatch) *PathLink
WithHeadersMatch ...
func (*PathLink) WithHostname ¶ added in v0.15.0
WithHostname ...
type PeersConfig ¶ added in v0.16.0
type PeersConfig struct {
SectionName string
LocalPeer PeersServer
GlobalTable string // used by global updater
Servers []PeersServer
Tables []PeersTable // updated on config.SyncConfig(), including global and backend tables
}
PeersConfig ...
type PeersServer ¶ added in v0.16.0
PeersServer ...
type PeersTable ¶ added in v0.16.0
PeersTable ...
type ProcsConfig ¶
type ProcsConfig struct {
Nbproc int
Nbthread int
NbprocBalance int
NbprocSSL int
BindprocBalance string
BindprocSSL string
CPUMap string
}
ProcsConfig ...
type RewriteConfig ¶ added in v0.14.12
RewriteConfig ...
type SSLConfig ¶
type SSLConfig struct {
ALPN string
BackendCiphers string
BackendCipherSuites string
Ciphers string // TLS up to 1.2
CipherSuites string // TLS 1.3
DefaultCAFilename string
DefaultCAHash string
DefaultCRLFilename string
DefaultCRLHash string
DHParam DHParamConfig
Engine string
HeadersPrefix string
ModeAsync bool
Options string
RedirectCode int
SSLRedirect bool
}
SSLConfig ...
type SecurityConfig ¶ added in v0.12.1
SecurityConfig ...
type ServerConfig ¶
type ServerConfig struct {
CAFilename string
CAHash string
Ciphers string // TLS up to 1.2
CipherSuites string // TLS 1.3
CRLFilename string
CRLHash string
CrtFilename string
CrtHash string
FastCGIApp string
InitialWeight int
MaxConn int
MaxQueue int
Options string
Protocol string
Secure bool
SendProxy string
SNI string
VerifyHost string
}
ServerConfig ...
type StatsConfig ¶
type StatsConfig struct {
AcceptProxy bool
Auth string
BindIP string
Port int
TLSFilename string
TLSHash string
}
StatsConfig ...
type SyslogConfig ¶
type SyslogConfig struct {
Endpoint string
Format string
Length int
Tag string
//
AuthLogFormat string
HTTPLogFormat string
HTTPSLogFormat string
TCPLogFormat string
}
SyslogConfig ...
type TCPBackend ¶
type TCPBackend struct {
Name string
Port int
Endpoints []*TCPEndpoint
CheckInterval string
SSL TCPSSL
ProxyProt TCPProxyProt
}
TCPBackend ...
func (*TCPBackend) AddEndpoint ¶
func (b *TCPBackend) AddEndpoint(ip string, port int) *TCPEndpoint
AddEndpoint ...
type TCPBackends ¶ added in v0.11.1
type TCPBackends struct {
// contains filtered or unexported fields
}
TCPBackends ...
func CreateTCPBackends ¶ added in v0.11.1
func CreateTCPBackends() *TCPBackends
CreateTCPBackends ...
func (*TCPBackends) Acquire ¶ added in v0.11.1
func (b *TCPBackends) Acquire(servicename string, port int) *TCPBackend
Acquire ...
func (*TCPBackends) BuildSortedItems ¶ added in v0.11.1
func (b *TCPBackends) BuildSortedItems() []*TCPBackend
BuildSortedItems ...
type TCPEndpoint ¶
TCPEndpoint ...
type TCPServiceHost ¶ added in v0.13.0
type TCPServiceHost struct {
Backend BackendID
// contains filtered or unexported fields
}
TCPServiceHost ...
func (*TCPServiceHost) Hostname ¶ added in v0.13.0
func (s *TCPServiceHost) Hostname() string
Hostname ...
type TCPServicePort ¶ added in v0.13.0
type TCPServicePort struct {
CustomConfig []string
LogFormat string
ProxyProt bool
TLS map[string]*TCPServiceTLSConfig
//
SNIMap *HostsMap
// contains filtered or unexported fields
}
TCPServicePort ...
func (*TCPServicePort) BuildSortedItems ¶ added in v0.13.0
func (s *TCPServicePort) BuildSortedItems() []*TCPServiceHost
BuildSortedItems ...
func (*TCPServicePort) BuildSortedTLSConfig ¶ added in v0.14.8
func (s *TCPServicePort) BuildSortedTLSConfig() []*TCPServiceTLSConfig
BuildSortedTLSConfig ...
func (*TCPServicePort) DefaultHost ¶ added in v0.13.0
func (s *TCPServicePort) DefaultHost() *TCPServiceHost
DefaultHost ...
func (*TCPServicePort) Hosts ¶ added in v0.13.0
func (s *TCPServicePort) Hosts() map[string]*TCPServiceHost
Hosts ...
type TCPServiceTLSConfig ¶ added in v0.14.8
type TCPServices ¶ added in v0.13.0
type TCPServices struct {
// contains filtered or unexported fields
}
TCPServices ...
func CreateTCPServices ¶ added in v0.13.0
func CreateTCPServices() *TCPServices
CreateTCPServices ...
func (*TCPServices) AcquireTCPService ¶ added in v0.13.0
func (s *TCPServices) AcquireTCPService(service string) (*TCPServicePort, *TCPServiceHost)
AcquireTCPService ...
func (*TCPServices) BuildSortedItems ¶ added in v0.13.0
func (s *TCPServices) BuildSortedItems() []*TCPServicePort
BuildSortedItems ...
func (*TCPServices) FindTCPPort ¶ added in v0.13.0
func (s *TCPServices) FindTCPPort(port int) *TCPServicePort
FindTCPPort ...
func (*TCPServices) Items ¶ added in v0.13.0
func (s *TCPServices) Items() map[int]*TCPServicePort
Items ...
func (*TCPServices) RemoveAll ¶ added in v0.13.0
func (s *TCPServices) RemoveAll(services []string)
RemoveAll removes services declared as a slice of <hostname>:<port>
func (*TCPServices) RemoveService ¶ added in v0.13.0
func (s *TCPServices) RemoveService(service string)
RemoveService ...
type TLSConfig ¶ added in v0.13.0
type TLSConfig struct {
ALPN string
CAFilename string
CAHash string
CAVerify CAVerify
Ciphers string
CipherSuites string
CRLFilename string
CRLHash string
Options string
TLSCommonName string
TLSFilename string
TLSHash string
TLSNotAfter time.Time
}
TLSConfig ...
func (*TLSConfig) CAVerifyOptional ¶ added in v0.13.0
CAVerifyOptional ...
type TimeoutConfig ¶
type TimeoutConfig struct {
BackendTimeoutConfig
Client string
ClientFin string
Stats string
Stop string
}
TimeoutConfig ...