config

package
v0.0.0-...-7e0a285 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLoadBalancerClass is the default load balancer class
	DefaultLoadBalancerClass = "default"
)

Variables

LoadBalancerSizes contains the valid size names

Functions

This section is empty.

Types

type LBConfig

type LBConfig struct {
	LoadBalancer      LoadBalancerConfig                  `yaml:"loadBalancer"`
	LoadBalancerClass map[string]*LoadBalancerClassConfig `yaml:"loadBalancerClass"`
}

LBConfig is used to read and store information from the cloud configuration file

func ReadConfigYAML

func ReadConfigYAML(byConfig []byte) (*LBConfig, error)

ReadConfigYAML parses vSphere cloud config file and stores it into Config

func ReadLBConfig

func ReadLBConfig(byConfig []byte) (*LBConfig, error)

ReadLBConfig parses vSphere cloud config file and stores it into VSphereConfig. Environment variables are also checked

func ReadRawConfigYAML

func ReadRawConfigYAML(byConfig []byte) (*LBConfig, error)

ReadRawConfigYAML parses vSphere cloud config file and stores it into ConfigYAML

func (*LBConfig) CompleteAndValidate

func (lbc *LBConfig) CompleteAndValidate() error

CompleteAndValidate sets default values, overrides by env and validates the resulting config

func (*LBConfig) IsEnabled

func (cfg *LBConfig) IsEnabled() bool

IsEnabled checks whether the load balancer feature is enabled It is enabled if any flavor of the load balancer configuration is given.

type LoadBalancerClassConfig

type LoadBalancerClassConfig struct {
	IPPoolName        string `yaml:"ipPoolName"`
	IPPoolID          string `yaml:"ipPoolId"`
	TCPAppProfileName string `yaml:"tcpAppProfileName"`
	TCPAppProfilePath string `yaml:"tcpAppProfilePath"`
	UDPAppProfileName string `yaml:"udpAppProfileName"`
	UDPAppProfilePath string `yaml:"udpAppProfilePath"`
}

LoadBalancerClassConfig contains the configuration for a load balancer class

type LoadBalancerConfig

type LoadBalancerConfig struct {
	Enabled          bool              `yaml:"enabled"`
	Size             string            `yaml:"size"`
	LBServiceID      string            `yaml:"lbServiceId"`
	Tier1GatewayPath string            `yaml:"tier1GatewayPath"`
	AdditionalTags   map[string]string `yaml:"tags"`

	LoadBalancerClassConfig `yaml:",inline"`
}

LoadBalancerConfig contains the configuration for the load balancer itself

Jump to

Keyboard shortcuts

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