Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergedConfig ¶
Types ¶
type BlockListConfig ¶
type BlockListConfig struct {
Format string `yaml:"format"`
Endpoint string `yaml:"endpoint"`
Authentication struct {
Type string `yaml:"type"`
User string `yaml:"user"`
Password string `yaml:"password"`
Token string `yaml:"token"`
TrustedIPs []string `yaml:"trusted_ips"`
} `yaml:"authentication"`
}
type Config ¶
type Config struct {
CrowdsecConfig CrowdsecConfig `yaml:"crowdsec_config"`
Blocklists []*BlockListConfig `yaml:"blocklists"`
ListenURI string `yaml:"listen_uri"`
TLS TLSConfig `yaml:"tls"`
Metrics MetricConfig `yaml:"metrics"`
Logging LoggingConfig `yaml:",inline"`
ConfigVersion string `yaml:"config_version"`
EnableAccessLogs bool `yaml:"enable_access_logs"`
}
func (*Config) ValidateAndSetDefaults ¶
type CrowdsecConfig ¶
type CrowdsecConfig struct {
LapiKey string `yaml:"lapi_key"`
LapiURL string `yaml:"lapi_url"`
UpdateFrequency string `yaml:"update_frequency"`
InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
CertPath string `yaml:"cert_path"`
KeyPath string `yaml:"key_path"`
CAPath string `yaml:"ca_cert_path"`
IncludeScenariosContaining []string `yaml:"include_scenarios_containing"`
ExcludeScenariosContaining []string `yaml:"exclude_scenarios_containing"`
OnlyIncludeDecisionsFrom []string `yaml:"only_include_decisions_from"`
Scopes []string `yaml:"scopes,omitempty"`
}
type LoggingConfig ¶
type LoggingConfig struct {
LogLevel *log.Level `yaml:"log_level"`
LogMedia string `yaml:"log_media"`
LogDir string `yaml:"log_dir"`
LogMaxSize int `yaml:"log_max_size,omitempty"`
LogMaxFiles int `yaml:"log_max_backups,omitempty"`
LogMaxAge int `yaml:"log_max_age,omitempty"`
CompressLogs *bool `yaml:"compress_logs,omitempty"`
}
func (*LoggingConfig) LoggerForFile ¶
func (c *LoggingConfig) LoggerForFile(fileName string) (io.Writer, error)
type MetricConfig ¶
Click to show internal directories.
Click to hide internal directories.