Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Conf = Config{ AdvertisePort: 4400, PGPort: 5432, DataDir: "/data/", StatusDir: "./status/", SyncCommand: "rsync -a --delete {{local_dir}} {{slave_ip}}:{{slave_dir}}", DecisionTimeout: 10, SystemUser: SystemUser(), } Log = lumber.NewConsoleLogger(lumber.INFO) )
establish constants these are singleton values that are used throughout the package.
Functions ¶
func ConfigureHBAConf ¶
configureHBAConf attempts to open the 'pg_hba.conf' file. Once open it will scan the file line by line looking for replication settings, and overwrite only those settings with the settings required for redundancy on Yoke
func ConfigurePGConf ¶
configurePGConf attempts to open the 'postgresql.conf' file. Once open it will scan the file line by line looking for replication settings, and overwrite only those settings with the settings required for redundancy
func SystemUser ¶
func SystemUser() string
Types ¶
type Config ¶
type Config struct { Role string AdvertiseIp string AdvertisePort int PGPort int Monitor string Primary string Secondary string DataDir string StatusDir string SyncCommand string DecisionTimeout int Vip string VipAddCommand string VipRemoveCommand string RoleChangeCommand string SystemUser string }
Config is the struct of all global configuration data it is set by a config file that is the first arguement given to the exec
Click to show internal directories.
Click to hide internal directories.