config

package
v2.9.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificates

type Certificates struct {
	CACert     string `yaml:"CACert" validate:"nonzero"`
	ServerName string `yaml:"ServerName"`
	TlsConfig  *tls.Config
}

type Config

type Config struct {
	Ips                    []string     `yaml:"Ips" validate:"nonzero"`
	BackupServerPort       int          `yaml:"BackupServerPort"`
	BackupAllMasters       bool         `yaml:"BackupAllMasters"`
	BackupFromInactiveNode bool         `yaml:"BackupFromInactiveNode"`
	GaleraAgentPort        int          `yaml:"GaleraAgentPort"`
	Credentials            Credentials  `yaml:"Credentials" validate:"nonzero"`
	Certificates           Certificates `yaml:"Certificates" validate:"nonzero"`
	TmpDir                 string       `yaml:"TmpDir" validate:"nonzero"`
	OutputDir              string       `yaml:"OutputDir" validate:"nonzero"`
	SymmetricKey           string       `yaml:"SymmetricKey" validate:"nonzero"`
	Logger                 lager.Logger
	MetadataFields         map[string]string
}

func NewConfig

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

func (*Config) CreateTlsConfig

func (this *Config) CreateTlsConfig() error

func (Config) Validate

func (c Config) Validate() error

type Credentials

type Credentials struct {
	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