plugin

package
v0.0.0-...-ab997d7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmbeddedPlugins = make(map[string]PluginFactory)
)

Functions

func New

func New(name string, f PluginFactory) *plugin

Types

type Env

type Env struct {
	ReadConfig func(interface{}) error
	Emit       func(*message.Event)
	Log        *log.Logger
}

type FilterPlugin

type FilterPlugin interface {
	Plugin
	Filter(*message.Event) (*message.Event, error)
}

type OutputPlugin

type OutputPlugin interface {
	Plugin
	Encode(*message.Event) (buffer.Sizer, error)
	Write([]buffer.Sizer) (int, error)
}

type Plugin

type Plugin interface {
	Init(*Env) error
	Start() error
	Close() error
}

type PluginFactory

type PluginFactory func() Plugin

Directories

Path Synopsis
cmd
cmd
cmd
cmd
cmd
cmd
cmd

Jump to

Keyboard shortcuts

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