Documentation ¶
Index ¶
Constants ¶
const (
// DefaultLoadBalancerClass is the default load balancer class
DefaultLoadBalancerClass = "default"
)
Variables ¶
var LoadBalancerSizes = sets.NewString( model.LBService_SIZE_SMALL, model.LBService_SIZE_MEDIUM, model.LBService_SIZE_LARGE, model.LBService_SIZE_XLARGE, model.LBService_SIZE_DLB, )
LoadBalancerSizes contains the valid size names
Functions ¶
This section is empty.
Types ¶
type LBConfig ¶
type LBConfig struct { LoadBalancer LoadBalancerConfig LoadBalancerClass map[string]*LoadBalancerClassConfig }
LBConfig is used to read and store information from the cloud configuration file
func ReadConfigINI ¶
ReadConfigINI parses vSphere cloud config file and stores it into Config
func ReadConfigYAML ¶
ReadConfigYAML parses vSphere cloud config file and stores it into Config
func ReadLBConfig ¶
ReadLBConfig parses vSphere cloud config file and stores it into VSphereConfig. Environment variables are also checked
type LBConfigINI ¶
type LBConfigINI struct { LoadBalancer LoadBalancerConfigINI `gcfg:"loadbalancer"` LoadBalancerClass map[string]*LoadBalancerClassConfigINI `gcfg:"loadbalancerclass"` }
LBConfigINI is used to read and store information from the cloud configuration file
func ReadRawConfigINI ¶
func ReadRawConfigINI(byConfig []byte) (*LBConfigINI, error)
ReadRawConfigINI parses vSphere cloud config file and stores it into ConfigINI
func (*LBConfigINI) CompleteAndValidate ¶
func (lbc *LBConfigINI) CompleteAndValidate() error
CompleteAndValidate sets default values, overrides by env and validates the resulting config
func (*LBConfigINI) CreateConfig ¶
func (lbc *LBConfigINI) CreateConfig() *LBConfig
CreateConfig generates a common Config object based on what other structs and funcs are already dependent upon in other packages.
type LBConfigYAML ¶
type LBConfigYAML struct { LoadBalancer LoadBalancerConfigYAML `yaml:"loadBalancer"` LoadBalancerClass map[string]*LoadBalancerClassConfigYAML `yaml:"loadBalancerClass"` }
LBConfigYAML is used to read and store information from the cloud configuration file
func ReadRawConfigYAML ¶
func ReadRawConfigYAML(byConfig []byte) (*LBConfigYAML, error)
ReadRawConfigYAML parses vSphere cloud config file and stores it into ConfigYAML
func (*LBConfigYAML) CompleteAndValidate ¶
func (lbc *LBConfigYAML) CompleteAndValidate() error
CompleteAndValidate sets default values, overrides by env and validates the resulting config
func (*LBConfigYAML) CreateConfig ¶
func (lbc *LBConfigYAML) CreateConfig() *LBConfig
CreateConfig generates a common Config object based on what other structs and funcs are already dependent upon in other packages.
type LoadBalancerClassConfig ¶
type LoadBalancerClassConfig struct { IPPoolName string IPPoolID string TCPAppProfileName string TCPAppProfilePath string UDPAppProfileName string UDPAppProfilePath string }
LoadBalancerClassConfig contains the configuration for a load balancer class
type LoadBalancerClassConfigINI ¶
type LoadBalancerClassConfigINI struct { IPPoolName string `gcfg:"ip-pool-name"` IPPoolID string `gcfg:"ip-pool-id"` TCPAppProfileName string `gcfg:"tcp-app-profile-name"` TCPAppProfilePath string `gcfg:"tcp-app-profile-path"` UDPAppProfileName string `gcfg:"udp-app-profile-name"` UDPAppProfilePath string `gcfg:"udp-app-profile-path"` }
LoadBalancerClassConfigINI contains the configuration for a load balancer class
type LoadBalancerClassConfigYAML ¶
type LoadBalancerClassConfigYAML 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"` }
LoadBalancerClassConfigYAML contains the configuration for a load balancer class
type LoadBalancerConfig ¶
type LoadBalancerConfig struct { LoadBalancerClassConfig Size string LBServiceID string Tier1GatewayPath string SnatDisabled bool AdditionalTags map[string]string }
LoadBalancerConfig contains the configuration for the load balancer itself
func (*LoadBalancerConfig) IsEmpty ¶
func (cfg *LoadBalancerConfig) IsEmpty() bool
IsEmpty checks whether the load balancer config is empty (no values specified)
type LoadBalancerConfigINI ¶
type LoadBalancerConfigINI struct { LoadBalancerClassConfigINI Size string `gcfg:"size"` LBServiceID string `gcfg:"lb-service-id"` Tier1GatewayPath string `gcfg:"tier1-gateway-path"` SnatDisabled bool `gcfg:"snat-disabled"` RawTags string `gcfg:"tags"` AdditionalTags map[string]string }
LoadBalancerConfigINI contains the configuration for the load balancer itself
type LoadBalancerConfigYAML ¶
type LoadBalancerConfigYAML struct { Size string `yaml:"size"` LBServiceID string `yaml:"lbServiceId"` Tier1GatewayPath string `yaml:"tier1GatewayPath"` SnatDisabled bool `yaml:"snatDisabled"` AdditionalTags map[string]string `yaml:"tags"` // this struct use to inherit from LoadBalancerClassConfigYAML, but the YAML parser // wasnt able to indirectly parse inherited fields IPPoolName string `yaml:"ipPoolName"` IPPoolID string `yaml:"ipPoolId"` TCPAppProfileName string `yaml:"tcpAppProfileName"` TCPAppProfilePath string `yaml:"tcpAppProfilePath"` UDPAppProfileName string `yaml:"udpAppProfileName"` UDPAppProfilePath string `yaml:"udpAppProfilePath"` }
LoadBalancerConfigYAML contains the configuration for the load balancer itself