loadbalancer

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

loadbalancer defines haproxy configuration that is used for the cluster load balancer. it is based on code from capd, with specific adjustments to work in LXC environments.

Index

Constants

View Source
const DefaultTemplate = `` /* 1097-byte string literal not displayed */

DefaultTemplate is the loadbalancer config template.

Variables

This section is empty.

Functions

func Config

func Config(data *ConfigData, configTemplate string) (config []byte, err error)

Config generates the loadbalancer config from the ConfigTemplate and ConfigData.

Types

type BackendServer

type BackendServer struct {
	Address string
	Weight  int
}

BackendServer defines a loadbalancer backend.

type ConfigData

type ConfigData struct {
	FrontendControlPlanePort string
	BackendControlPlanePort  string
	BackendServers           map[string]BackendServer
	IPv6                     bool
}

ConfigData is supplied to the loadbalancer config template.

Jump to

Keyboard shortcuts

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