Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶ added in v1.9.0
ValidateConfig validates the config file and returns an error if the config is invalid.
Types ¶
type BufferSizes ¶ added in v1.8.0
type Config ¶
type Config struct {
Webserver struct {
ServerConfig `mapstructure:",squash"`
FullURL string `mapstructure:"full_url"`
LiteURL string `mapstructure:"lite_url"`
DomainsOnlyURL string `mapstructure:"domains_only_url"`
CompressionEnabled bool `mapstructure:"compression_enabled"`
}
Prometheus struct {
ServerConfig `mapstructure:",squash"`
Enabled bool `mapstructure:"enabled"`
MetricsURL string `mapstructure:"metrics_url"`
ExposeSystemMetrics bool `mapstructure:"expose_system_metrics"`
}
General struct {
// DisableDefaultLogs indicates whether the default logs used in Google Chrome and provided by Google should be disabled.
DisableDefaultLogs bool `mapstructure:"disable_default_logs"`
// AdditionalLogs contains additional logs provided by the user that can be used in addition to the default logs.
AdditionalLogs []LogConfig `mapstructure:"additional_logs"`
AdditionalTiledLogs []LogConfig `mapstructure:"additional_tiled_logs"`
BufferSizes BufferSizes `mapstructure:"buffer_sizes"`
DropOldLogs *bool `mapstructure:"drop_old_logs"`
Recovery struct {
Enabled bool `mapstructure:"enabled"`
CTIndexFile string `mapstructure:"ct_index_file"`
} `mapstructure:"recovery"`
}
}
var ( AppConfig Config Version = "1.9.0" )
func ReadConfig ¶
ReadConfig reads the configuration using Viper and returns a filled Config struct. It also validates and stores the result in AppConfig.
type ServerConfig ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.