Documentation ¶
Overview ¶
Copyright 2020 CLOUD&HEAT Technologies GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- func FillAgentConfig(cfg *AgentConfig)
- func FillControllerConfig(cfg *ControllerConfig)
- func FillKeepalivedConfig(cfg *Keepalived)
- func FillNftablesConfig(cfg *Nftables)
- func ReadAgentConfig(configFile io.Reader, config *AgentConfig) error
- func ReadControllerConfig(configReader io.Reader, config *ControllerConfig) error
- func ValidateAgentConfig(cfg *AgentConfig) error
- func ValidateControllerConfig(cfg *ControllerConfig) error
- type Agent
- type AgentConfig
- type Agents
- type BackendLayer
- type ControllerConfig
- type Keepalived
- type Nftables
- type PortManager
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FillAgentConfig ¶
func FillAgentConfig(cfg *AgentConfig)
func FillControllerConfig ¶
func FillControllerConfig(cfg *ControllerConfig)
func FillKeepalivedConfig ¶
func FillKeepalivedConfig(cfg *Keepalived)
func FillNftablesConfig ¶
func FillNftablesConfig(cfg *Nftables)
func ReadAgentConfig ¶
func ReadAgentConfig(configFile io.Reader, config *AgentConfig) error
func ReadControllerConfig ¶
func ReadControllerConfig(configReader io.Reader, config *ControllerConfig) error
func ValidateAgentConfig ¶
func ValidateAgentConfig(cfg *AgentConfig) error
func ValidateControllerConfig ¶
func ValidateControllerConfig(cfg *ControllerConfig) error
Types ¶
type AgentConfig ¶
type AgentConfig struct { BindAddress string `toml:"bind-address"` BindPort int32 `toml:"bind-port"` Keepalived Keepalived `toml:"keepalived"` Nftables Nftables `toml:"nftables"` }
func ReadAgentConfigFromFile ¶
func ReadAgentConfigFromFile(path string, withDefaults bool) (AgentConfig, error)
type BackendLayer ¶
type BackendLayer string
const ( BackendLayerNodePort BackendLayer = "NodePort" BackendLayerClusterIP BackendLayer = "ClusterIP" BackendLayerPod BackendLayer = "Pod" )
type ControllerConfig ¶
type ControllerConfig struct { BindAddress string `toml:"bind-address"` BindPort int32 `toml:"bind-port"` PortManager PortManager `toml:"port-manager"` BackendLayer BackendLayer `toml:"backend-layer"` OpenStack openstack.Config `toml:"openstack"` Static static.Config `toml:"static"` Agents Agents `toml:"agents"` }
func ReadControllerConfigFromFile ¶
func ReadControllerConfigFromFile(path string, withDefaults bool) (ControllerConfig, error)
type Keepalived ¶
type Keepalived struct { Enabled bool `toml:"enabled"` VRRPPassword string `toml:"vrrp-password"` // TODO: allow different priorities per-service so that inbound traffic // is being balanced between VMs. Priority int `toml:"priority"` VRIDBase int `toml:"virtual-router-id-base"` Interface string `toml:"interface"` Service ServiceConfig `toml:"service"` }
type Nftables ¶
type Nftables struct { FilterTableName string `toml:"filter-table-name"` FilterTableType string `toml:"filter-table-type"` FilterForwardChainName string `toml:"filter-forward-chain"` NATTableName string `toml:"nat-table-name"` NATPreroutingChainName string `toml:"nat-prerouting-chain"` NATPostroutingChainName string `toml:"nat-postrouting-chain"` PolicyPrefix string `toml:"policy-prefix"` NftCommand []string `toml:"nft-command"` PartialReload bool `toml:"partial-reload"` EnableSNAT bool `toml:"enable-snat"` FWMarkBits uint32 `toml:"fwmark-bits"` FWMarkMask uint32 `toml:"fwmark-mask"` Service ServiceConfig `toml:"service"` }
type PortManager ¶ added in v0.6.0
type PortManager string
const ( PortManagerOpenstack PortManager = "openstack" PortManagerStatic PortManager = "static" )
Click to show internal directories.
Click to hide internal directories.