config

package
v9.9.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidDelay = errors.New("WriteReadDelay must be less than the PollFrequency")

Functions

This section is empty.

Types

type Canary

type Canary struct {
	Database string `yaml:"Database" validate:"nonzero"`
	Username string `yaml:"Username" validate:"nonzero"`
	Password string `yaml:"Password" validate:"nonzero"`
}

type Config

type Config struct {
	PidFile           string `yaml:"PidFile" validate:"nonzero"`
	Logger            lager.Logger
	MySQL             MySQL         `yaml:"MySQL" validate:"nonzero"`
	Canary            Canary        `yaml:"Canary" validate:"nonzero"`
	Notifications     Notifications `yaml:"Notifications" validate:"nonzero"`
	Switchboard       Switchboard   `yaml:"Switchboard" validate:"nonzero"`
	WriteReadDelay    int           `yaml:"WriteReadDelay" validate:"nonzero"`
	PollFrequency     int           `yaml:"PollFrequency" validate:"nonzero,min=1"`
	NotifyOnly        bool          `yaml:"NotifyOnly"`
	SkipSSLValidation bool          `yaml:"SkipSSLValidation"`
	APIPort           uint          `yaml:"APIPort"`
}

func NewConfig

func NewConfig(osArgs []string) (*Config, error)

func (Config) Validate

func (c Config) Validate() error

type MySQL

type MySQL struct {
	ClusterIPs            []string `yaml:"ClusterIPs" validate:"nonzero"`
	Port                  int      `yaml:"Port" validate:"nonzero"`
	GaleraHealthcheckPort int      `yaml:"GaleraHealthcheckPort" validate:"nonzero"`
}

type Notifications

type Notifications struct {
	AdminClientUsername string `yaml:"AdminClientUsername" validate:"nonzero"`
	AdminClientSecret   string `yaml:"AdminClientSecret" validate:"nonzero"`
	ClientUsername      string `yaml:"ClientUsername" validate:"nonzero"`
	ClientSecret        string `yaml:"ClientSecret" validate:"nonzero"`
	NotificationsDomain string `yaml:"NotificationsDomain" validate:"nonzero"`
	UAADomain           string `yaml:"UAADomain" validate:"nonzero"`
	ToAddress           string `yaml:"ToAddress" validate:"nonzero"`
	SystemDomain        string `yaml:"SystemDomain" validate:"nonzero"`
	ClusterIdentifier   string `yaml:"ClusterIdentifier" validate:"nonzero"`
}

type Switchboard

type Switchboard struct {
	URLs     []string `yaml:"URLs" validate:"nonzero"`
	Username string   `yaml:"Username" validate:"nonzero"`
	Password string   `yaml:"Password" validate:"nonzero"`
}

Jump to

Keyboard shortcuts

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