Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string `toml:"host" json:"host"` Port int `toml:"port" json:"port"` Store string `toml:"store" json:"store"` Path string `toml:"path" json:"path"` Socket string `toml:"socket" json:"socket"` BinlogSocket string `toml:"binlog-socket" json:"binlog-socket"` Lease string `toml:"lease" json:"lease"` RunDDL bool `toml:"run-ddl" json:"run-ddl"` Log Log `toml:"log" json:"log"` Security Security `toml:"security" json:"security"` Status Status `toml:"status" json:"status"` Performance Performance `toml:"performance" json:"performance"` XProtocol XProtocol `toml:"xprotocol" json:"xprotocol"` }
Config contains configuration options.
func GetGlobalConfig ¶
func GetGlobalConfig() *Config
GetGlobalConfig returns the global configuration for this server. It should store configuration from command line and configuration file. Other parts of the system can read the global configuration use this function.
type Log ¶
type Log struct { // Log level. Level string `toml:"level" json:"level"` // Log format. one of json, text, or console. Format string `toml:"format" json:"format"` // Disable automatic timestamps in output. DisableTimestamp bool `toml:"disable-timestamp" json:"disable-timestamp"` // File log config. File logutil.FileLogConfig `toml:"file" json:"file"` SlowThreshold int `toml:"slow-threshold" json:"slow-threshold"` QueryLogMaxLen int `toml:"query-log-max-len" json:"query-log-max-len"` }
Log is the log section of config.
func (*Log) ToLogConfig ¶
ToLogConfig converts *Log to *logutil.LogConfig.
type Performance ¶
type Performance struct { TCPKeepAlive bool `toml:"tcp-keep-alive" json:"tcp-keep-alive"` RetryLimit int `toml:"retry-limit" json:"retry-limit"` JoinConcurrency int `toml:"join-concurrency" json:"join-concurrency"` CrossJoin bool `toml:"cross-join" json:"cross-join"` StatsLease string `toml:"stats-lease" json:"stats-lease"` }
Performance is the performance section of the config.
type Security ¶
type Security struct { SkipGrantTable bool `toml:"skip-grant-table" json:"skip-grant-table"` SSLCA string `toml:"ssl-ca" json:"ssl-ca"` SSLCert string `toml:"ssl-cert" json:"ssl-cert"` SSLKey string `toml:"ssl-key" json:"ssl-key"` }
Security is the security section of the config.
type Status ¶
type Status struct { ReportStatus bool `toml:"report-status" json:"report-status"` StatusPort int `toml:"status-port" json:"status-port"` MetricsAddr string `toml:"metrics-addr" json:"metrics-addr"` MetricsInterval int `toml:"metrics-interval" json:"metrics-interval"` }
Status is the status section of the config.
Click to show internal directories.
Click to hide internal directories.