types

package
v0.11.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MatchBegin  = MatchType("begin")
	MatchExact  = MatchType("exact")
	MatchPrefix = MatchType("prefix")
	MatchRegex  = MatchType("regex")
)

...

View Source
const DefaultHost = "<default>"

DefaultHost ...

Variables

This section is empty.

Functions

This section is empty.

Types

type Acme added in v0.9.1

type Acme struct {
	Enabled bool
	Prefix  string
	Shared  bool
	Socket  string
}

Acme ...

type AcmeCerts added in v0.11.1

type AcmeCerts struct {
	// contains filtered or unexported fields
}

AcmeCerts ...

func (*AcmeCerts) AddDomains added in v0.11.1

func (c *AcmeCerts) AddDomains(domains []string)

AddDomains ...

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) Commit added in v0.11.1

func (c *AcmeStorages) Commit()

Commit ...

func (*AcmeStorages) RemoveAll added in v0.11.1

func (c *AcmeStorages) RemoveAll(names []string)

RemoveAll ...

func (*AcmeStorages) Updated added in v0.11.1

func (c *AcmeStorages) Updated() bool

Updated ...

type AgentCheck

type AgentCheck struct {
	Addr     string
	Interval string
	Port     int
	Send     string
}

AgentCheck ...

type Backend

type Backend struct {
	ID        string
	Namespace string
	Name      string
	Port      string
	DNSPort   string
	Endpoints []*Endpoint
	EpNaming  EndpointNaming
	Paths     []*BackendPath
	PathsMap  *HostsMap
	//
	// per backend config
	//
	AgentCheck       AgentCheck
	BalanceAlgorithm string
	BlueGreen        BlueGreenConfig
	Cookie           Cookie
	CustomConfig     []string
	Dynamic          DynBackendConfig
	Headers          []*BackendHeader
	HealthCheck      HealthCheck
	Limit            BackendLimit
	ModeTCP          bool
	OAuth            OAuthConfig
	Resolver         string
	Server           ServerConfig
	Timeout          BackendTimeoutConfig
	TLS              BackendTLSConfig
	WhitelistTCP     []string
	//
	// per path config
	//
	// TODO refactor
	//
	// The current implementation is tricky. A small refactor is welcome
	// but can wait a little more. Multipath unit tests need to do a
	// better job as well.
	//
	// Following some tips in order to multipath work properly:
	//
	//   1. On backend annotation parsing, do not filter
	//      mapper.GetBackendConfig/Str() slice, instead populate
	//      haproxy type even with empty data. Backend.NeedACL() need
	//      to know all paths in order to work properly. Filter out
	//      empty/disabled items in the template.
	//
	//   2. Every config array added here, need also to be added
	//      in Backend.NeedACL() - haproxy/types/backend.go.
	//      Template uses this func in order to know if a config
	//      has two or more paths, and so need to be configured with ACL.
	//
	AuthHTTP      []*BackendConfigAuth
	Cors          []*BackendConfigCors
	HSTS          []*BackendConfigHSTS
	MaxBodySize   []*BackendConfigInt
	RewriteURL    []*BackendConfigStr
	SSLRedirect   []*BackendConfigBool
	WAF           []*BackendConfigWAF
	WhitelistHTTP []*BackendConfigWhitelist
	// contains filtered or unexported fields
}

Backend ...

func (*Backend) AcquireEndpoint

func (b *Backend) AcquireEndpoint(ip string, port int, targetRef string) *Endpoint

AcquireEndpoint ...

func (*Backend) AddBackendPath added in v0.11.1

func (b *Backend) AddBackendPath(link PathLink) *BackendPath

AddBackendPath ...

func (*Backend) AddEmptyEndpoint

func (b *Backend) AddEmptyEndpoint() *Endpoint

AddEmptyEndpoint ...

func (*Backend) BackendID added in v0.11.1

func (b *Backend) BackendID() BackendID

BackendID ...

func (*Backend) CreateConfigBool

func (b *Backend) CreateConfigBool(value bool) []*BackendConfigBool

CreateConfigBool ...

func (*Backend) CreateConfigInt added in v0.11.1

func (b *Backend) CreateConfigInt(value int64) []*BackendConfigInt

CreateConfigInt ...

func (*Backend) FindBackendPath added in v0.11.1

func (b *Backend) FindBackendPath(link PathLink) *BackendPath

FindBackendPath ...

func (*Backend) FindEndpoint

func (b *Backend) FindEndpoint(target string) *Endpoint

FindEndpoint ...

func (*Backend) HasCorsEnabled

func (b *Backend) HasCorsEnabled() bool

HasCorsEnabled ...

func (*Backend) HasModsec

func (b *Backend) HasModsec() bool

HasModsec is a method to verify if a Backend has ModSecurity Enabled

func (*Backend) HasSSLRedirect

func (b *Backend) HasSSLRedirect() bool

HasSSLRedirect ...

func (*Backend) HasSSLRedirectPaths

func (b *Backend) HasSSLRedirectPaths(paths *BackendPaths) bool

HasSSLRedirectPaths ...

func (*Backend) Hostnames

func (b *Backend) Hostnames() []string

Hostnames ...

func (*Backend) LinkHasSSLRedirect added in v0.11.1

func (b *Backend) LinkHasSSLRedirect(link PathLink) bool

LinkHasSSLRedirect ...

func (*Backend) NeedACL

func (b *Backend) NeedACL() bool

NeedACL ...

type BackendConfigAuth

type BackendConfigAuth struct {
	Paths        BackendPaths
	UserlistName string
	Realm        string
}

BackendConfigAuth ...

func (*BackendConfigAuth) String

func (b *BackendConfigAuth) String() string

String ...

type BackendConfigBool

type BackendConfigBool struct {
	Paths  BackendPaths
	Config bool
}

BackendConfigBool ...

func (*BackendConfigBool) String

func (b *BackendConfigBool) String() string

String ...

type BackendConfigCors

type BackendConfigCors struct {
	Paths  BackendPaths
	Config Cors
}

BackendConfigCors ...

func (*BackendConfigCors) String

func (b *BackendConfigCors) String() string

String ...

type BackendConfigHSTS

type BackendConfigHSTS struct {
	Paths  BackendPaths
	Config HSTS
}

BackendConfigHSTS ...

func (*BackendConfigHSTS) String

func (b *BackendConfigHSTS) String() string

String ...

type BackendConfigInt

type BackendConfigInt struct {
	Paths  BackendPaths
	Config int64
}

BackendConfigInt ...

func (*BackendConfigInt) String

func (b *BackendConfigInt) String() string

String ...

type BackendConfigStr

type BackendConfigStr struct {
	Paths  BackendPaths
	Config string
}

BackendConfigStr ...

func (*BackendConfigStr) String

func (b *BackendConfigStr) String() string

String ...

type BackendConfigWAF added in v0.9.1

type BackendConfigWAF struct {
	Paths  BackendPaths
	Config WAF
}

BackendConfigWAF defines Web Application Firewall Configurations

func (*BackendConfigWAF) String added in v0.9.1

func (b *BackendConfigWAF) String() string

String ...

type BackendConfigWhitelist

type BackendConfigWhitelist struct {
	Paths  BackendPaths
	Config []string
}

BackendConfigWhitelist ...

func (*BackendConfigWhitelist) String

func (b *BackendConfigWhitelist) String() string

String ...

type BackendHeader added in v0.11.1

type BackendHeader struct {
	Name  string
	Value string
}

BackendHeader ...

func (*BackendHeader) String added in v0.11.1

func (h *BackendHeader) String() string

String ...

type BackendID added in v0.11.1

type BackendID struct {
	Namespace string
	Name      string
	Port      string
	// contains filtered or unexported fields
}

BackendID ...

func (BackendID) String added in v0.11.1

func (b BackendID) String() string

type BackendLimit

type BackendLimit struct {
	Connections int
	RPS         int
	Whitelist   []string
}

BackendLimit ...

type BackendPath

type BackendPath struct {
	ID   string
	Link PathLink
}

BackendPath ...

func (*BackendPath) Hostname

func (p *BackendPath) Hostname() string

Hostname ...

func (*BackendPath) Path

func (p *BackendPath) Path() string

Path ...

func (*BackendPath) String

func (p *BackendPath) String() string

String ...

type BackendPaths

type BackendPaths struct {
	Items []*BackendPath
}

BackendPaths ...

func NewBackendPaths

func NewBackendPaths(paths ...*BackendPath) BackendPaths

NewBackendPaths ...

func (*BackendPaths) Add

func (p *BackendPaths) Add(paths ...*BackendPath)

Add ...

func (*BackendPaths) IDList

func (p *BackendPaths) IDList() []string

IDList ...

type BackendTLSConfig

type BackendTLSConfig struct {
	AddCertHeader    bool
	FingerprintLower bool
	HasTLSAuth       bool
}

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 {
	// contains filtered or unexported fields
}

Backends ...

func CreateBackends added in v0.11.1

func CreateBackends(shardCount int) *Backends

CreateBackends ...

func (*Backends) AcquireBackend added in v0.11.1

func (b *Backends) AcquireBackend(namespace, name, port string) *Backend

AcquireBackend ...

func (*Backends) BackendChanged added in v0.11.9

func (b *Backends) BackendChanged(backend *Backend)

BackendChanged ...

func (*Backends) BuildSortedItems added in v0.11.1

func (b *Backends) BuildSortedItems() []*Backend

BuildSortedItems ...

func (*Backends) BuildSortedShard added in v0.11.1

func (b *Backends) BuildSortedShard(shardRef int) []*Backend

BuildSortedShard ...

func (*Backends) Changed added in v0.11.1

func (b *Backends) Changed() bool

Changed ...

func (*Backends) ChangedShards added in v0.11.1

func (b *Backends) ChangedShards() []int

ChangedShards ...

func (*Backends) Commit added in v0.11.1

func (b *Backends) Commit()

Commit ...

func (*Backends) DefaultBackend added in v0.11.1

func (b *Backends) DefaultBackend() *Backend

DefaultBackend ...

func (*Backends) FindBackend added in v0.11.1

func (b *Backends) FindBackend(namespace, name, port string) *Backend

FindBackend ...

func (*Backends) FindBackendID added in v0.11.1

func (b *Backends) FindBackendID(backendID BackendID) *Backend

FindBackendID ...

func (*Backends) Items added in v0.11.1

func (b *Backends) Items() map[string]*Backend

Items ...

func (*Backends) ItemsAdd added in v0.11.1

func (b *Backends) ItemsAdd() map[string]*Backend

ItemsAdd ...

func (*Backends) ItemsDel added in v0.11.1

func (b *Backends) ItemsDel() map[string]*Backend

ItemsDel ...

func (*Backends) RemoveAll added in v0.11.1

func (b *Backends) RemoveAll(backendID []BackendID)

RemoveAll ...

func (*Backends) SetDefaultBackend added in v0.11.1

func (b *Backends) SetDefaultBackend(defaultBackend *Backend)

SetDefaultBackend ...

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

func (b *Backends) SortChangedEndpoints(sortBy string)

SortChangedEndpoints ...

type BlueGreenConfig added in v0.9.1

type BlueGreenConfig struct {
	CookieName string
	HeaderName string
}

BlueGreenConfig ...

type Cookie struct {
	Name     string
	Dynamic  bool
	Shared   bool
	Strategy string
	Keywords string
}

Cookie ...

type CookieConfig

type CookieConfig struct {
	Key string
}

CookieConfig ...

type Cors

type Cors struct {
	Enabled bool
	//
	AllowCredentials bool
	AllowHeaders     string
	AllowMethods     string
	AllowOrigin      string
	ExposeHeaders    string
	MaxAge           int
}

Cors ...

type DHParamConfig

type DHParamConfig struct {
	Filename       string
	DefaultMaxSize int
}

DHParamConfig ...

type DNSConfig

type DNSConfig struct {
	ClusterDomain string
	Resolvers     []*DNSResolver
}

DNSConfig ...

func (*DNSConfig) String

func (dns *DNSConfig) String() string

type DNSNameserver

type DNSNameserver struct {
	Name     string
	Endpoint string
}

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 DrainConfig

type DrainConfig struct {
	Drain      bool
	Redispatch bool
}

DrainConfig ...

type DynBackendConfig

type DynBackendConfig struct {
	BlockSize    int
	DynUpdate    bool
	MinFreeSlots int
}

DynBackendConfig ...

type Endpoint

type Endpoint struct {
	Enabled   bool
	Label     string
	IP        string
	Name      string
	Port      int
	Target    string
	TargetRef string
	Weight    int
}

Endpoint ...

func (*Endpoint) IsEmpty

func (ep *Endpoint) IsEmpty() bool

IsEmpty ...

type EndpointNaming

type EndpointNaming int

EndpointNaming ...

const (
	EpSequence EndpointNaming = iota
	EpIPPort
	EpTargetRef
)

...

type Frontend

type Frontend struct {
	Maps        *FrontendMaps
	BindName    string
	BindSocket  string
	BindID      int
	AcceptProxy bool
	//
	DefaultCrtFile string
	DefaultCrtHash string
	CrtListFile    string
}

Frontend ...

func (*Frontend) String

func (f *Frontend) String() string

String ...

type FrontendMaps added in v0.11.1

type FrontendMaps struct {
	HTTPHostMap  *HostsMap
	HTTPSHostMap *HostsMap
	HTTPSSNIMap  *HostsMap
	//
	RedirToHTTPSMap   *HostsMap
	RedirFromRootMap  *HostsMap
	SSLPassthroughMap *HostsMap
	VarNamespaceMap   *HostsMap
	//
	TLSAuthList           *HostsMap
	TLSNeedCrtList        *HostsMap
	TLSInvalidCrtPagesMap *HostsMap
	TLSMissingCrtPagesMap *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
	LoadServerState bool
	AdminSocket     string
	Healthz         HealthzConfig
	Prometheus      PromConfig
	Stats           StatsConfig
	StrictHost      bool
	UseChroot       bool
	UseHAProxyUser  bool
	UseHTX          bool
	CustomConfig    []string
	CustomDefaults  []string
	CustomFrontend  []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 HSTS

type HSTS struct {
	Enabled    bool
	MaxAge     int
	Subdomains bool
	Preload    bool
}

HSTS ...

type HealthCheck

type HealthCheck struct {
	Addr      string
	FallCount int
	Interval  string
	Port      int
	RiseCount int
	URI       string
}

HealthCheck ...

type HealthzConfig

type HealthzConfig struct {
	BindIP string
	Port   int
}

HealthzConfig ...

type Host

type Host struct {
	Hostname string
	Paths    []*HostPath
	//
	Alias                  HostAliasConfig
	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) AddPath

func (h *Host) AddPath(backend *Backend, path string, match MatchType)

AddPath ...

func (*Host) FindPath

func (h *Host) FindPath(path string) *HostPath

FindPath ...

func (*Host) HasTLSAuth

func (h *Host) HasTLSAuth() bool

HasTLSAuth ...

func (*Host) SSLPassthrough

func (h *Host) SSLPassthrough() bool

SSLPassthrough ...

func (*Host) SetSSLPassthrough added in v0.11.1

func (h *Host) SetSSLPassthrough(value bool)

SetSSLPassthrough ...

func (*Host) String

func (h *Host) String() string

String ...

type HostAliasConfig

type HostAliasConfig struct {
	AliasName  string
	AliasRegex string
}

HostAliasConfig ...

type HostBackend

type HostBackend struct {
	ID        string
	Namespace string
	Name      string
	Port      string
}

HostBackend ...

type HostPath

type HostPath struct {
	Path    string
	Link    PathLink
	Match   MatchType
	Backend HostBackend
}

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.

type HostTLSConfig

type HostTLSConfig struct {
	ALPN             string
	CAErrorPage      string
	CAFilename       string
	CAHash           string
	CAVerifyOptional bool
	Ciphers          string
	CipherSuites     string
	CRLFilename      string
	CRLHash          string
	Options          string
	TLSCommonName    string
	TLSFilename      string
	TLSHash          string
	TLSNotAfter      time.Time
}

HostTLSConfig ...

func (*HostTLSConfig) HasTLS

func (h *HostTLSConfig) HasTLS() bool

HasTLS ...

type Hosts added in v0.11.1

type Hosts struct {
	// contains filtered or unexported fields
}

Hosts ...

func CreateHosts added in v0.11.1

func CreateHosts() *Hosts

CreateHosts ...

func (*Hosts) AcquireHost added in v0.11.1

func (h *Hosts) AcquireHost(hostname string) *Host

AcquireHost ...

func (*Hosts) BuildSortedItems added in v0.11.1

func (h *Hosts) BuildSortedItems() []*Host

BuildSortedItems ...

func (*Hosts) Changed added in v0.11.1

func (h *Hosts) Changed() bool

Changed ...

func (*Hosts) Commit added in v0.11.1

func (h *Hosts) Commit()

Commit ...

func (*Hosts) DefaultHost added in v0.11.1

func (h *Hosts) DefaultHost() *Host

DefaultHost ...

func (*Hosts) FindHost added in v0.11.1

func (h *Hosts) FindHost(hostname string) *Host

FindHost ...

func (*Hosts) HasCommit added in v0.11.2

func (h *Hosts) HasCommit() bool

HasCommit ...

func (*Hosts) HasSSLPassthrough added in v0.11.1

func (h *Hosts) HasSSLPassthrough() bool

HasSSLPassthrough ...

func (*Hosts) HasVarNamespace added in v0.11.1

func (h *Hosts) HasVarNamespace() bool

HasVarNamespace ...

func (*Hosts) Items added in v0.11.1

func (h *Hosts) Items() map[string]*Host

Items ...

func (*Hosts) ItemsAdd added in v0.11.1

func (h *Hosts) ItemsAdd() map[string]*Host

ItemsAdd ...

func (*Hosts) ItemsDel added in v0.11.1

func (h *Hosts) ItemsDel() map[string]*Host

ItemsDel ...

func (*Hosts) RemoveAll added in v0.11.1

func (h *Hosts) RemoveAll(hostnames []string)

RemoveAll ...

func (*Hosts) Shrink added in v0.11.1

func (h *Hosts) Shrink()

Shrink removes matching added and deleted hosts from the changing hashmap tracker that has the same content. A matching added+deleted pair means that a hostname was reparsed but its content wasn't changed.

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

func (hm *HostsMap) AddHostnameMapping(hostname, target string)

AddHostnameMapping ...

func (*HostsMap) AddHostnamePathMapping added in v0.11.1

func (hm *HostsMap) AddHostnamePathMapping(hostname string, hostPath *HostPath, target string)

AddHostnamePathMapping ...

func (*HostsMap) HasHost

func (hm *HostsMap) HasHost() bool

HasHost ...

func (*HostsMap) MatchFiles added in v0.11.2

func (hm *HostsMap) MatchFiles() []*MatchFile

MatchFiles ...

type HostsMapEntry

type HostsMapEntry struct {
	Key   string
	Value string
	// contains filtered or unexported fields
}

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 ...

func CreateMaps

func CreateMaps(matchOrder []MatchType) *HostsMaps

CreateMaps ...

func (*HostsMaps) AddMap

func (hm *HostsMaps) AddMap(basename string) *HostsMap

AddMap ...

type MatchFile added in v0.11.2

type MatchFile struct {
	// contains filtered or unexported fields
}

MatchFile ...

func (MatchFile) Filename added in v0.11.2

func (m MatchFile) Filename() string

Filename ...

func (MatchFile) First added in v0.11.2

func (m MatchFile) First() bool

First ...

func (MatchFile) Lower added in v0.11.2

func (m MatchFile) Lower() bool

Lower ...

func (MatchFile) Method added in v0.11.2

func (m MatchFile) Method() string

Method ...

func (MatchFile) Values added in v0.11.2

func (m MatchFile) Values() []*HostsMapEntry

Values ...

type MatchType added in v0.11.1

type MatchType string

MatchType ...

type ModSecurityConfig

type ModSecurityConfig struct {
	Endpoints []string
	Timeout   ModSecurityTimeoutConfig
}

ModSecurityConfig ...

type ModSecurityTimeoutConfig

type ModSecurityTimeoutConfig struct {
	// Backend
	Connect string
	Server  string
	// SPOE
	Hello      string
	Idle       string
	Processing string
}

ModSecurityTimeoutConfig ...

type OAuthConfig

type OAuthConfig struct {
	AlwaysDeny  bool
	Impl        string
	BackendName string
	URIPrefix   string
	Headers     map[string]string
}

OAuthConfig ...

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 CreatePathLink(hostname, path string) PathLink

CreatePathLink ...

func (*PathLink) IsEmpty added in v0.11.1

func (l *PathLink) IsEmpty() bool

IsEmpty ...

func (*PathLink) Less added in v0.11.1

func (l *PathLink) Less(other PathLink, reversePath bool) bool

Less ...

type ProcsConfig

type ProcsConfig struct {
	Nbproc          int
	Nbthread        int
	NbprocBalance   int
	NbprocSSL       int
	BindprocBalance string
	BindprocSSL     string
	CPUMap          string
}

ProcsConfig ...

type PromConfig added in v0.10.1

type PromConfig struct {
	BindIP string
	Port   int
}

PromConfig ...

type SSLConfig

type SSLConfig struct {
	ALPN                string
	BackendCiphers      string
	BackendCipherSuites string
	Ciphers             string // TLS up to 1.2
	CipherSuites        string // TLS 1.3
	DHParam             DHParamConfig
	Engine              string
	HeadersPrefix       string
	ModeAsync           bool
	Options             string
	RedirectCode        int
}

SSLConfig ...

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
	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
	HTTPLogFormat  string
	HTTPSLogFormat string
	Length         int
	Tag            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 ...

func (*TCPBackend) String

func (b *TCPBackend) String() string

String ...

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 ...

func (*TCPBackends) Changed added in v0.11.1

func (b *TCPBackends) Changed() bool

Changed ...

func (*TCPBackends) Commit added in v0.11.1

func (b *TCPBackends) Commit()

Commit ...

func (*TCPBackends) RemoveAll added in v0.11.1

func (b *TCPBackends) RemoveAll()

RemoveAll ...

type TCPEndpoint

type TCPEndpoint struct {
	Name   string
	IP     string
	Port   int
	Target string
}

TCPEndpoint ...

func (*TCPEndpoint) String

func (ep *TCPEndpoint) String() string

String ...

type TCPProxyProt

type TCPProxyProt struct {
	Decode        bool
	EncodeVersion string
}

TCPProxyProt ...

type TCPSSL

type TCPSSL struct {
	Filename    string
	CAFilename  string
	CRLFilename string
}

TCPSSL ...

type TimeoutConfig

type TimeoutConfig struct {
	BackendTimeoutConfig
	Client    string
	ClientFin string
	Stop      string
}

TimeoutConfig ...

type User

type User struct {
	Name      string
	Passwd    string
	Encrypted bool
}

User ...

type Userlist

type Userlist struct {
	Name  string
	Users []User
}

Userlist ...

func (*Userlist) String

func (u *Userlist) String() string

type UserlistConfig

type UserlistConfig struct {
	Name  string
	Realm string
}

UserlistConfig ...

type Userlists added in v0.11.1

type Userlists struct {
	// contains filtered or unexported fields
}

Userlists ...

func CreateUserlists added in v0.11.1

func CreateUserlists() *Userlists

CreateUserlists ...

func (*Userlists) BuildSortedItems added in v0.11.1

func (u *Userlists) BuildSortedItems() []*Userlist

BuildSortedItems ...

func (*Userlists) Changed added in v0.11.1

func (u *Userlists) Changed() bool

Changed ...

func (*Userlists) Commit added in v0.11.1

func (u *Userlists) Commit()

Commit ...

func (*Userlists) Find added in v0.11.1

func (u *Userlists) Find(name string) *Userlist

Find ...

func (*Userlists) RemoveAll added in v0.11.1

func (u *Userlists) RemoveAll(userlists []string)

RemoveAll ...

func (*Userlists) Replace added in v0.11.1

func (u *Userlists) Replace(name string, users []User) *Userlist

Replace ...

type WAF added in v0.9.1

type WAF struct {
	// Mode defines On or DetectionOnly
	Mode string
	// Which WAF Module should be used
	Module string
}

WAF Defines the WAF Config structure for the Backend

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL