Documentation ¶
Index ¶
- Constants
- Variables
- func GetMapPath(name string) string
- type Certificates
- type Maps
- type Rule
- type RuleID
- type RuleStatus
- type RuleType
- type Rules
- func (r Rules) AddRule(rule Rule, ingressName string, frontends ...string) error
- func (r Rules) Clean(frontends ...string)
- func (r Rules) DeleteFrontend(frontend string)
- func (r Rules) GetIngressRuleIDs(ingress string) (ruleIDs []RuleID)
- func (r Rules) Refresh(client api.HAProxyClient) (reload bool)
- type SecretCtx
- type SecretType
Constants ¶
View Source
const ( MAP_SNI = "sni" MAP_HOST = "host" MAP_PATH_EXACT = "path-exact" MAP_PATH_PREFIX = "path-prefix" )
Variables ¶
View Source
var ErrCertNotFound = errors.New("notFound")
View Source
var HTTPACLVar = "txn.path_match"
HTTPACLVar used to match against RuleID in haproxy http frontend
View Source
var TCPACLVar = "txn.sni_match"
TCPACLVar used to match against RuleID in haproxy ssl frontend
Functions ¶
func GetMapPath ¶ added in v1.5.0
Types ¶
type Certificates ¶ added in v1.5.0
type Certificates struct {
// contains filtered or unexported fields
}
func NewCertificates ¶ added in v1.5.0
func NewCertificates(caDir, ftDir, bdDir string) *Certificates
func (*Certificates) Clean ¶ added in v1.5.0
func (c *Certificates) Clean()
func (*Certificates) FrontendCertsEnabled ¶ added in v1.5.0
func (c *Certificates) FrontendCertsEnabled() bool
func (*Certificates) HandleTLSSecret ¶ added in v1.5.0
func (*Certificates) Refresh ¶ added in v1.5.0
func (c *Certificates) Refresh() (reload bool)
Refresh removes unused certs from HAProxyCertDir
type Maps ¶
type Maps map[string]*mapFile
func NewMapFiles ¶
type Rule ¶ added in v1.5.0
type Rule interface { Create(client api.HAProxyClient, frontend *models.Frontend, ingressACL string) error GetType() RuleType }
type RuleStatus ¶ added in v1.5.0
type RuleStatus int
RuleStatus describing Rule creation
const ( // exclusive states CREATED RuleStatus = 0 TO_CREATE RuleStatus = 1 TO_DELETE RuleStatus = 2 // non exclusive states INGRESS RuleStatus = 4 )
nolint: golint,stylecheck
type RuleType ¶ added in v1.5.0
type RuleType int
Order matters ! Rules will be evaluated by HAProxy in the defined order.
type Rules ¶ added in v1.5.0
type Rules struct {
// contains filtered or unexported fields
}
func (Rules) DeleteFrontend ¶ added in v1.5.2
func (Rules) GetIngressRuleIDs ¶ added in v1.5.0
type SecretCtx ¶ added in v1.5.0
type SecretCtx struct { DefaultNS string SecretPath string SecretType SecretType }
type SecretType ¶ added in v1.5.0
type SecretType int
const ( NONE_CERT SecretType = iota FT_CERT FT_DEFAULT_CERT BD_CERT CA_CERT )
Click to show internal directories.
Click to hide internal directories.