config

package
v8.20.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Port     uint   `yaml:"port"`
}

type CanaryConfig

type CanaryConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	ApiPort  uint   `yaml:"api_port"`
}

type Config

type Config struct {
	Canary *CanaryConfig `yaml:"canary"`
	Mysql  MysqlConfig   `yaml:"mysql"`
}

func LoadFromFile

func LoadFromFile(filepath string) (*Config, error)

func (*Config) HostsWithLogs

func (c *Config) HostsWithLogs() []string

type MysqlConfig

type MysqlConfig struct {
	Username  string           `yaml:"username"`
	Password  string           `yaml:"password"`
	Port      uint             `yaml:"port"`
	Agent     *AgentConfig     `yaml:"agent"`
	Threshold *ThresholdConfig `yaml:"threshold"`
	Nodes     []MysqlNode      `yaml:"nodes"`
}

func (*MysqlConfig) Connection

func (mysqlConfig *MysqlConfig) Connection(node MysqlNode) *sql.DB

func (*MysqlConfig) ConnectionString

func (mysqlConfig *MysqlConfig) ConnectionString(node MysqlNode) string

type MysqlNode

type MysqlNode struct {
	Host string `yaml:"host"`
	Name string `yaml:"name"`
	UUID string `yaml:"uuid"`
}

type ThresholdConfig

type ThresholdConfig struct {
	DiskUsedWarningPercent       uint `yaml:"disk_used_warning_percent"`
	DiskInodesUsedWarningPercent uint `yaml:"disk_inodes_used_warning_percent"`
}

Jump to

Keyboard shortcuts

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