csconfig

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 9 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrowdSec

type CrowdSec struct {
	WorkingFolder     string    `yaml:"working_dir,omitempty"`
	DataFolder        string    `yaml:"data_dir,omitempty"`
	ConfigFolder      string    `yaml:"config_dir,omitempty"`
	AcquisitionFile   string    `yaml:"acquis_path,omitempty"`
	SingleFile        string    //for forensic mode
	SingleFileLabel   string    //for forensic mode
	PIDFolder         string    `yaml:"pid_dir,omitempty"`
	LogFolder         string    `yaml:"log_dir,omitempty"`
	LogMode           string    `yaml:"log_mode,omitempty"`  //like file, syslog or stdout ?
	LogLevel          log.Level `yaml:"log_level,omitempty"` //trace,debug,info,warning,error
	Daemonize         bool      `yaml:"daemon,omitempty"`    //true -> go background
	Profiling         bool      `yaml:"profiling,omitempty"` //true -> enable runtime profiling
	APIMode           bool      `yaml:"apimode,omitempty"`   //true -> enable api push
	CsCliFolder       string    `yaml:"cscli_dir"`           //cscli folder
	NbParsers         int       `yaml:"parser_routines"`     //the number of go routines to start for parsing
	SimulationCfgPath string    `yaml:"simulation_path,omitempty"`
	SimulationCfg     *SimulationConfig
	Linter            bool
	Prometheus        bool
	PrometheusMode    string `yaml:"prometheus_mode"`
	HTTPListen        string `yaml:"http_listen,omitempty"`
	RestoreMode       string
	DumpBuckets       bool
	OutputConfig      *outputs.OutputFactory `yaml:"plugin"`
}

CrowdSec is the structure of the crowdsec configuration

func NewCrowdSecConfig

func NewCrowdSecConfig() *CrowdSec

NewCrowdSecConfig create a new crowdsec configuration with default configuration

func (*CrowdSec) LoadConfig added in v0.3.1

func (c *CrowdSec) LoadConfig() error

LoadConfig return configuration parsed from command line and configuration file

func (*CrowdSec) LoadConfigurationFile added in v0.3.1

func (c *CrowdSec) LoadConfigurationFile(configFile *string) error

func (*CrowdSec) LoadSimulation added in v0.3.0

func (c *CrowdSec) LoadSimulation() error

type SimulationConfig added in v0.3.0

type SimulationConfig struct {
	Simulation bool     `yaml:"simulation"`
	Exclusions []string `yaml:"exclusions,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL