config

package
v1.3.26 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2015 License: Apache-2.0 Imports: 4 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 {
	ListenAddress                              string
	MySQLTopologyUser                          string
	MySQLTopologyPassword                      string // my.cnf style configuration file from where to pick credentials. Expecting `user`, `password` under `[client]` section
	MySQLTopologyCredentialsConfigFile         string
	MySQLTopologyMaxPoolConnections            int // Max concurrent connections on any topology instance
	MySQLOrchestratorHost                      string
	MySQLOrchestratorPort                      uint
	MySQLOrchestratorDatabase                  string
	MySQLOrchestratorUser                      string
	MySQLOrchestratorPassword                  string
	MySQLOrchestratorCredentialsConfigFile     string // my.cnf style configuration file from where to pick credentials. Expecting `user`, `password` under `[client]` section
	MySQLConnectTimeoutSeconds                 int    // Number of seconds before connection is aborted (driver-side)
	DefaultInstancePort                        uint   // In case port was not specified on command line
	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                       uint   // Auto/continuous discovery of instances sleep time between polls
	InstanceBulkOperationsWaitTimeoutSeconds   uint   // Time to wait on a single instance when doing bulk (many instances) operation
	ActiveNodeExpireSeconds                    uint
	HostnameResolveMethod                      string // Method by which to "normalize" hostname ("none"/"default"/"cname")
	ExpiryHostnameResolvesMinutes              int    // Number of minutes after which to expire hostname-resolves
	RejectHostnameResolvePattern               string // Regexp pattern for resolved hostname that will not be accepted (not cached, not written to db). This is done to avoid storing wrong resovles due to network glitches.
	ReasonableReplicationLagSeconds            int    // Above this value is considered a problem
	MaintenanceOwner                           string // (Default) name of maintenance owner to use if none provided
	ReasonableMaintenanceReplicationLagSeconds int    // Above this value move-up and move-below are blocked
	AuditLogFile                               string // Name of log file for audit operations. Disabled when empty.
	AuditPageSize                              int
	ReadOnly                                   bool
	AuthenticationMethod                       string            // Type of autherntication to use, if any. "" for none, "basic" for BasicAuth, "multi" for advanced BasicAuth, "proxy" for forwarded credentials via reverse proxy
	HTTPAuthUser                               string            // Username for HTTP Basic authentication (blank disables authentication)
	HTTPAuthPassword                           string            // Password for HTTP Basic authentication
	AuthUserHeader                             string            // HTTP header indicating auth user, when AuthenticationMethod is "proxy"
	PowerAuthUsers                             []string          // On AuthenticationMethod == "proxy", list of users that can make changes. All others are read-only.
	ClusterNameToAlias                         map[string]string // map between regex matching cluster name to a human friendly alias
	ServeAgentsHttp                            bool              // Spawn another HTTP interface dedicated for orcehstrator-agent
	AgentsUseSSL                               bool              // When "true" orchestrator will listen on agents port with SSL as well as connect to agents via SSL
	SSLSkipVerify                              bool              // When using SSL, should we ignore SSL certification error
	SSLPrivateKeyFile                          string            // Name of SSL private key file, applies only when AgentsUseSSL = true
	SSLCertFile                                string            // Name of SSL certification file, applies only when AgentsUseSSL = true
	HttpTimeoutSeconds                         int               // Number of idle seconds before HTTP GET request times out (when accessing orchestrator-agent)
	AgentPollMinutes                           uint              // Minutes between agent polling
	UnseenAgentForgetHours                     uint              // Number of hours after which an unseen agent is forgotten
	StaleSeedFailMinutes                       uint              // Number of minutes after which a stale (no progress) seed is considered failed.
	SeedAcceptableBytesDiff                    int64             // Difference in bytes between seed source & target data size that is still considered as successful copy
	PseudoGTIDPattern                          string            // Pattern to look for in binary logs that makes for a unique entry (pseudo GTID). When empty, Pseudo-GTID based refactoring is disabled.
}

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