config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2014 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	MySQLTopologyUser                          string
	MySQLTopologyPassword                      string
	MySQLOrchestratorHost                      string
	MySQLOrchestratorPort                      uint
	MySQLOrchestratorDatabase                  string
	MySQLOrchestratorUser                      string
	MySQLOrchestratorPassword                  string
	SlaveLagQuery                              string // custom query to check on slave lg (e.g. heartbeat table)
	SlaveStartPostWaitMilliseconds             int    // Time to wait after START SLAVE before re-readong instance (give slave chance to connect to master)
	DiscoverByShowSlaveHosts                   bool   // Attempt SHOW SLAVE HOSTS before PROCESSLIST
	InstancePollSeconds                        uint   // Number of seconds between instance reads
	UnseenInstanceForgetHours                  uint   // Number of hours after which an unseen instance is forgotten
	DiscoveryPollSeconds                       int    // Auto/continuous discovery of instances sleep time between polls
	ReasonableReplicationLagSeconds            int    // Abvoe this value is considered a problem
	ReasonableMaintenanceReplicationLagSeconds int    // Above this value move-up and move-below are blocked
	AuditPageSize                              int
	HTTPAuthUser                               string // Username for HTTP Basic authentication (blank disables authentication)
	HTTPAuthPassword                           string // Password for HTTP Basic authentication
}

Configuration makes for orchestrator configuration input, which can be provided by user via JSON formatted file. Some of the parameteres have reasonable default values, and some (like database credentials) are strictly expected from user.

func ForceRead

func ForceRead(file_name string) *Configuration

ForceRead reads configuration from given file name or bails out if it fails

func NewConfiguration

func NewConfiguration() *Configuration

func Read

func Read(file_names ...string) *Configuration

Read reads configuration from zero, either, some or all given files, in order of input. A file can override configuration provided in previous file.

Jump to

Keyboard shortcuts

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