config

package
v2.1.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB                    DBConfig    `yaml:"DB" validate:"nonzero"`
	Monit                 MonitConfig `yaml:"Monit" validate:"nonzero"`
	Host                  string      `yaml:"Host" validate:"nonzero"`
	Port                  int         `yaml:"Port" validate:"nonzero"`
	AvailableWhenDonor    bool        `yaml:"AvailableWhenDonor"`
	AvailableWhenReadOnly bool        `yaml:"AvailableWhenReadOnly"`
	PidFile               string      `yaml:"PidFile" validate:"nonzero"`
	Logger                lager.Logger
	MysqldPath            string                `yaml:"MysqldPath" validate:"nonzero"`
	MyCnfPath             string                `yaml:"MyCnfPath" validate:"nonzero"`
	SidecarEndpoint       SidecarEndpointConfig `yaml:"SidecarEndpoint" validate:"nonzero"`
}

func NewConfig

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

func (*Config) IsHealthy

func (c *Config) IsHealthy(state domain.DBState) bool

func (Config) Validate

func (c Config) Validate() error

type DBConfig

type DBConfig struct {
	Host     string `yaml:"Host" validate:"nonzero"`
	User     string `yaml:"User" validate:"nonzero"`
	Port     int    `yaml:"Port" validate:"nonzero"`
	Password string `yaml:"Password" validate:"nonzero"`
}

type MonitConfig

type MonitConfig struct {
	Host                    string `yaml:"Host" validate:"nonzero"`
	User                    string `yaml:"User" validate:"nonzero"`
	Port                    int    `yaml:"Port" validate:"nonzero"`
	Password                string `yaml:"Password" validate:"nonzero"`
	MysqlStateFilePath      string `yaml:"MysqlStateFilePath"`
	BootstrapFilePath       string `yaml:"BootstrapFilePath"`
	BootstrapLogFilePath    string `yaml:"BootstrapLogFilePath"`
	ServiceName             string `yaml:"ServiceName" validate:"nonzero"`
	EnableSstMarkerFilePath string `yaml:"EnableSstMarkerFilePath"`
	SstInterruptNotifyCmd   string `yaml:"SstInterruptNotifyCmd"`
}

type SidecarEndpointConfig

type SidecarEndpointConfig 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