Documentation ¶
Index ¶
- Constants
- Variables
- type ConfigurationOption
- func Backups(number int) ConfigurationOption
- func BackupsDir(bckDir string) ConfigurationOption
- func ConfigurationFile(configurationFile string) ConfigurationOption
- func HAProxyBin(path string) ConfigurationOption
- func PreferredTimeSuffix(suffix 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" // DefaultTimeSuffix uses the most appropriate Time unit for serialization DefaultTimeSuffix = "nearest" )
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 BackupsDir ¶
func BackupsDir(bckDir string) ConfigurationOption
func ConfigurationFile ¶
func ConfigurationFile(configurationFile string) ConfigurationOption
func HAProxyBin ¶
func HAProxyBin(path string) ConfigurationOption
func PreferredTimeSuffix ¶
func PreferredTimeSuffix(suffix string) ConfigurationOption
PreferredTimeSuffix allows specifying which time unit will be favored when serializing Time values in the configuration. Allowed values: nearest (default), none, ms, s, m, h, d.
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 BackupsDir string // 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 PreferredTimeSuffix string BackupsNumber int PersistentTransactions bool SkipFailedTransactions bool UseModelsValidation bool SkipConfigurationFileValidation bool // opposite of previously available ValidateConfigurationFile MasterWorker bool UseMd5Hash bool }
Source Files ¶
- backups.go
- configuration-file.go
- defaults.go
- haproxy-bin.go
- master-worker.go
- options.go
- prefered-time-suffix.go
- skip-configuration-file-validation.go
- skip-failed-transactions.go
- transactions-directory.go
- use-md5-hash.go
- use-models-validation.go
- use-persistent-transactions.go
- validate-cmd.go
- validate-config-files.go
Click to show internal directories.
Click to hide internal directories.