mode

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

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCpMode

func ValidateCpMode(mode CpMode) error

ValidateCpMode to check modes of kuma-cp

Types

type CpMode

type CpMode = string
const (
	Standalone CpMode = "standalone"
	Remote     CpMode = "remote"
	Global     CpMode = "global"
)

type EndpointConfig

type EndpointConfig struct {
	Address string `yaml:"address"`
}

type GlobalConfig

type GlobalConfig struct {
	LBAddress string        `yaml:"lbaddress,omitempty"`
	Zones     []*ZoneConfig `yaml:"zones"`
}

Global configuration

func DefaultGlobalConfig

func DefaultGlobalConfig() *GlobalConfig

func (*GlobalConfig) Sanitize

func (g *GlobalConfig) Sanitize()

func (*GlobalConfig) Validate

func (g *GlobalConfig) Validate() error

type ModeConfig

type ModeConfig struct {
	Mode   CpMode        `yaml:"mode" envconfig:"kuma_mode_mode"`
	Global *GlobalConfig `yaml:"global,omitempty"`
	Remote *RemoteConfig `yaml:"remote,omitempty"`
}

Mode configuration

func DefaultModeConfig

func DefaultModeConfig() *ModeConfig

func (*ModeConfig) Sanitize

func (m *ModeConfig) Sanitize()

func (*ModeConfig) Validate

func (m *ModeConfig) Validate() error

type RemoteConfig

type RemoteConfig struct {
	// Kuma Zone name used to mark the remote dataplane resources
	Zone string `yaml:"zone,omitempty" envconfig:"kuma_mode_remote_zone"`
}

Remote configuration

func DefaultRemoteConfig

func DefaultRemoteConfig() *RemoteConfig

func (*RemoteConfig) Sanitize

func (r *RemoteConfig) Sanitize()

func (*RemoteConfig) Validate

func (r *RemoteConfig) Validate() error

type ZoneConfig

type ZoneConfig struct {
	Remote  EndpointConfig `yaml:"remote,omitempty"`
	Ingress EndpointConfig `yaml:"ingress,omitempty"`
}

func (*ZoneConfig) Sanitize

func (z *ZoneConfig) Sanitize()

func (*ZoneConfig) Validate

func (z *ZoneConfig) Validate() error

Jump to

Keyboard shortcuts

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