haproxy

package
v4.0.0-0.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HAPROXY_MAX_LINE_ARGS is the maximum number of arguments that haproxy
	// supports on a configuration line.
	// Ref: https://github.com/haproxy/haproxy/blob/master/include/common/defaults.h#L75
	HAPROXY_MAX_LINE_ARGS = 64

	// HAPROXY_MAX_WHITELIST_LENGTH is the maximum number of CIDRs allowed
	// for an "acl whitelist src [<cidr>]*" config line.
	HAPROXY_MAX_WHITELIST_LENGTH = HAPROXY_MAX_LINE_ARGS - 3
)

Variables

This section is empty.

Functions

func ValidateWhiteList

func ValidateWhiteList(value string) ([]string, bool)

ValidateWhiteList validates a haproxy acl whitelist from an annotation value.

Types

type BackendConfig

type BackendConfig struct {
	Name           string
	Host           string
	Path           string
	IsWildcard     bool
	Termination    routev1.TLSTerminationType
	InsecurePolicy routev1.InsecureEdgeTerminationPolicyType
	HasCertificate bool
}

BackendConfig is the haproxy backend config.

type HAProxyMapEntry

type HAProxyMapEntry struct {
	Key   string
	Value string
}

HAProxyMapEntry is a haproxy map entry.

func GenerateMapEntry

func GenerateMapEntry(id string, cfg *BackendConfig) *HAProxyMapEntry

GenerateMapEntry generates a haproxy map entry.

Jump to

Keyboard shortcuts

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