Documentation
¶
Index ¶
- func Factory() (pipeline.AnyPlugin, pipeline.AnyConfig)
- type Config
- type Plugable
- type Plugin
- type Plugins
- func (p *Plugins) Add(plugName string, plug Plugable)
- func (p *Plugins) Exists(plugName string) (exists bool)
- func (p *Plugins) IsDynamic(PlugName string) bool
- func (p *Plugins) IsStatic(plugName string) bool
- func (p *Plugins) Out(event *pipeline.Event, selector pipeline.PluginSelector)
- func (p *Plugins) Start(starterData pipeline.PluginsStarterMap)
- func (p *Plugins) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
//> File name for log file.
//> defaultTargetFileName = TargetFile default value
TargetFile string `json:"target_file" default:"/var/log/file-d.log"` //*
//> Interval of creation new file
RetentionInterval cfg.Duration `json:"retention_interval" default:"1h" parse:"duration"` //*
RetentionInterval_ time.Duration
//> Layout is added to targetFile after sealing up. Determines result file name
Layout string `json:"time_layout" default:"01-02-2006_15:04:05"` //*
//> How much workers will be instantiated to send batches.
WorkersCount cfg.Expression `json:"workers_count" default:"gomaxprocs*4" parse:"expression"` //*
WorkersCount_ int
//> Maximum quantity of events to pack into one batch.
BatchSize cfg.Expression `json:"batch_size" default:"capacity/4" parse:"expression"` //*
BatchSize_ int
//> After this timeout batch will be sent even if batch isn't completed.
BatchFlushTimeout cfg.Duration `json:"batch_flush_timeout" default:"1s" parse:"duration"` //*
BatchFlushTimeout_ time.Duration
//> File mode for log files
FileMode cfg.Base8 `json:"file_mode" default:"0666" parse:"base8"` //*
FileMode_ int64
}
type Plugin ¶
type Plugin struct {
SealUpCallback func(string)
// contains filtered or unexported fields
}
type Plugins ¶
type Plugins struct {
// contains filtered or unexported fields
}
Plugins is an abstraction upon multiple file.Plugin, which helps reuse it.
func NewFilePlugins ¶
func (*Plugins) Out ¶
func (p *Plugins) Out(event *pipeline.Event, selector pipeline.PluginSelector)
func (*Plugins) Start ¶
func (p *Plugins) Start(starterData pipeline.PluginsStarterMap)
Start runs all plugins.
Click to show internal directories.
Click to hide internal directories.