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 { // > @3@4@5@6 // > // > File path to write events to. // > Each rotated file will be named with current unix timestamp. // > // > For example, if `target_file` is `/var/log/file-d.log` // > file will be `/var/log/1893445200_file-d.log` TargetFile string `json:"target_file" default:"/var/log/file-d.log"` // * // > @3@4@5@6 // > // > How often to rotate a particular file. RetentionInterval cfg.Duration `json:"retention_interval" default:"1h" parse:"duration"` // * RetentionInterval_ time.Duration // > @3@4@5@6 // > // > Layout is added to targetFile after sealing up. Determines result file name Layout string `json:"time_layout" default:"01-02-2006_15:04:05"` // * // > @3@4@5@6 // > // > How much workers will be instantiated to send batches. WorkersCount cfg.Expression `json:"workers_count" default:"gomaxprocs*4" parse:"expression"` // * WorkersCount_ int // > @3@4@5@6 // > // > Maximum quantity of events to pack into one batch. BatchSize cfg.Expression `json:"batch_size" default:"capacity/4" parse:"expression"` // * BatchSize_ int // > @3@4@5@6 // > // > A minimum size of events in a batch to send. // > If both batch_size and batch_size_bytes are set, they will work together. BatchSizeBytes cfg.Expression `json:"batch_size_bytes" default:"0" parse:"expression"` // * BatchSizeBytes_ int // > @3@4@5@6 // > // > 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 // > @3@4@5@6 // > // > File mode for log files FileMode cfg.Base8 `json:"file_mode" default:"0666" parse:"base8"` // * FileMode_ int64 }
! config-params ^ config-params
type Plugin ¶
type Plugin struct { SealUpCallback func(string) plugin.NoMetricsPlugin // 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.