@@ -46,29 +46,29 @@ type DB struct {
4646// Options define user configurable database options.
4747type Options struct {
4848 // Maximum number of open connections to the database.
49- MaxConnections int `yaml:"max_connections" default:"16"`
49+ MaxConnections int `yaml:"max_connections" env:"MAX_CONNECTIONS" default:"16"`
5050
5151 // Maximum number of connections per table,
5252 // regardless of what the connection is actually doing,
5353 // e.g. INSERT, UPDATE, DELETE.
54- MaxConnectionsPerTable int `yaml:"max_connections_per_table" default:"8"`
54+ MaxConnectionsPerTable int `yaml:"max_connections_per_table" env:"MAX_CONNECTIONS_PER_TABLE" default:"8"`
5555
5656 // MaxPlaceholdersPerStatement defines the maximum number of placeholders in an
5757 // INSERT, UPDATE or DELETE statement. Theoretically, MySQL can handle up to 2^16-1 placeholders,
5858 // but this increases the execution time of queries and thus reduces the number of queries
5959 // that can be executed in parallel in a given time.
6060 // The default is 2^13, which in our tests showed the best performance in terms of execution time and parallelism.
61- MaxPlaceholdersPerStatement int `yaml:"max_placeholders_per_statement" default:"8192"`
61+ MaxPlaceholdersPerStatement int `yaml:"max_placeholders_per_statement" env:"MAX_PLACEHOLDERS_PER_STATEMENT" default:"8192"`
6262
6363 // MaxRowsPerTransaction defines the maximum number of rows per transaction.
6464 // The default is 2^13, which in our tests showed the best performance in terms of execution time and parallelism.
65- MaxRowsPerTransaction int `yaml:"max_rows_per_transaction" default:"8192"`
65+ MaxRowsPerTransaction int `yaml:"max_rows_per_transaction" env:"MAX_ROWS_PER_TRANSACTION" default:"8192"`
6666
6767 // WsrepSyncWait enforces Galera cluster nodes to perform strict cluster-wide causality checks
6868 // before executing specific SQL queries determined by the number you provided.
6969 // Please refer to the below link for a detailed description.
7070 // https://icinga.com/docs/icinga-db/latest/doc/03-Configuration/#galera-cluster
71- WsrepSyncWait int `yaml:"wsrep_sync_wait" default:"7"`
71+ WsrepSyncWait int `yaml:"wsrep_sync_wait" env:"WSREP_SYNC_WAIT" default:"7"`
7272}
7373
7474// Validate checks constraints in the supplied database options and returns an error if they are violated.
0 commit comments