Documentation ¶
Index ¶
- func LoadOutputProfiles(profileConfig string) ([]types.Profile, error)
- func OvflwToOrder(sig types.SignalOccurence, prof types.Profile) (*types.BanOrder, error, error)
- type Output
- func (o *Output) Delete(target string) (int, error)
- func (o *Output) DeleteAll() error
- func (o *Output) Flush() error
- func (o *Output) FlushAll()
- func (o *Output) InitAPI(config map[string]string) error
- func (o *Output) Insert(sig types.SignalOccurence) error
- func (o *Output) LoadAPIConfig(configFile string) error
- func (o *Output) ProcessOutput(sig types.SignalOccurence, profiles []types.Profile) error
- func (o *Output) ReadAT(timeAT time.Time) ([]map[string]string, error)
- func (o *Output) Shutdown() error
- func (o *Output) StartAutoCommit() error
- type OutputFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OvflwToOrder ¶
Transform an overflow (SignalOccurence) and a Profile into a BanOrder
Types ¶
type Output ¶
type Output struct { API *cwapi.ApiCtx Config *OutputFactory // contains filtered or unexported fields }
Output holds the runtime objects of backend
func NewOutput ¶
func NewOutput(config *OutputFactory) (*Output, error)
func (*Output) LoadAPIConfig ¶
func (*Output) ProcessOutput ¶
func (*Output) StartAutoCommit ¶ added in v0.2.3
type OutputFactory ¶
type OutputFactory struct { BackendFolder string `yaml:"backend,omitempty"` //For the db GC : how many records can we keep at most MaxRecords string `yaml:"max_records,omitempty"` //For the db GC what is the oldest records we tolerate MaxRecordsAge string `yaml:"max_records_age,omitempty"` //Should we automatically flush expired bans Flush bool Debug bool `yaml:"debug"` }
OutputFactory is part of the main yaml configuration file, and holds generic backend config
Click to show internal directories.
Click to hide internal directories.