Documentation ¶
Index ¶
- Constants
- Variables
- type ConfigurationOption
- func Backups(number int) ConfigurationOption
- func ConfigurationFile(configurationFile string) ConfigurationOption
- func HAProxyBin(path string) ConfigurationOption
- func TransactionsDir(path string) ConfigurationOption
- func ValidateCmd(cmd string) ConfigurationOption
- func ValidateConfigFiles(before, after []string) ConfigurationOption
- type ConfigurationOptions
Constants ¶
View Source
const ( // DefaultUseValidation sane default using validation in client native DefaultUseValidation = true // DefaultPersistentTransactions sane default using persistent transactions in client native DefaultPersistentTransactions = true // DefaultValidateConfigurationFile is used to validate HAProxy configuration file DefaultValidateConfigurationFile = true // DefaultConfigurationFile sane default for path to haproxy configuration file DefaultConfigurationFile = "/etc/haproxy/haproxy.cfg" // DefaultHaproxy sane default for path to haproxy executable DefaultHaproxy = "/usr/sbin/haproxy" // DefaultTransactionDir sane default for path for transactions DefaultTransactionDir = "/etc/haproxy/transactions" )
Variables ¶
View Source
var MasterWorker = masterWorker{} //nolint:gochecknoglobals
View Source
var SkipConfigurationFileValidation = skipConfigurationFileValidation{} //nolint:gochecknoglobals
View Source
var SkipFailedTransactions = skipFailedTransactions{} //nolint:gochecknoglobals
View Source
var UseMd5Hash = useMd5Hash{} //nolint:gochecknoglobals
View Source
var UseModelsValidation = useModelsValidation{} //nolint:gochecknoglobals
View Source
var UsePersistentTransactions = persistentTransactions{} //nolint:gochecknoglobals
Functions ¶
This section is empty.
Types ¶
type ConfigurationOption ¶
type ConfigurationOption interface {
Set(p *ConfigurationOptions) error
}
func Backups ¶
func Backups(number int) ConfigurationOption
Backups sets number of backups for configuration file
func ConfigurationFile ¶
func ConfigurationFile(configurationFile string) ConfigurationOption
func HAProxyBin ¶
func HAProxyBin(path string) ConfigurationOption
func TransactionsDir ¶
func TransactionsDir(path string) ConfigurationOption
func ValidateCmd ¶
func ValidateCmd(cmd string) ConfigurationOption
ValidateCmd allows specifying a custom script to validate the transaction file. The injected environment variable DATAPLANEAPI_TRANSACTION_FILE must be used to get the location of the file.
func ValidateConfigFiles ¶
func ValidateConfigFiles(before, after []string) ConfigurationOption
ValidateConfigFiles takes list of before an after configuration files that need to be checked along side ConfigurationFile this is sometimes necessary since HAProxy config can be in multiple files
type ConfigurationOptions ¶
type ConfigurationOptions struct { ConfigurationFile string Haproxy string TransactionDir string PersistentTransactions bool SkipFailedTransactions bool BackupsNumber int UseModelsValidation bool SkipConfigurationFileValidation bool // opposite of previously available ValidateConfigurationFile MasterWorker bool UseMd5Hash bool // ValidateCmd allows specifying a custom script to validate the transaction file. // The injected environment variable DATAPLANEAPI_TRANSACTION_FILE must be used to get the location of the file. ValidateCmd string ValidateConfigFilesBefore []string ValidateConfigFilesAfter []string }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.