engine

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: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b []byte, v interface{}) error

func Encode

func Encode(v interface{}) ([]byte, error)

Types

type Emitter

type Emitter interface {
	Emit(*message.Event) error
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New() *Engine

func (*Engine) Emit

func (e *Engine) Emit(ev *message.Event)

func (*Engine) Filter

func (e *Engine) Filter(ev *message.Event)

func (*Engine) RegisterBuffer

func (e *Engine) RegisterBuffer(opts *buffer.Options)

func (*Engine) RegisterFilterPlugin

func (e *Engine) RegisterFilterPlugin(conf map[string]interface{}) error

func (*Engine) RegisterInputPlugin

func (e *Engine) RegisterInputPlugin(conf map[string]interface{})

func (*Engine) RegisterOutputPlugin

func (e *Engine) RegisterOutputPlugin(name string, conf map[string]interface{}) error

func (*Engine) Start

func (e *Engine) Start()

func (*Engine) Stop

func (e *Engine) Stop()

func (*Engine) Wait

func (e *Engine) Wait()

type ExecUnit

type ExecUnit struct {
	ID     int32
	Router *TagRouter
	// contains filtered or unexported fields
}

func (*ExecUnit) Emit

func (u *ExecUnit) Emit(ev *message.Event) error

func (*ExecUnit) Send

func (u *ExecUnit) Send(ev *message.Message) (err error)

func (*ExecUnit) Start

func (u *ExecUnit) Start() error

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

func NewInstance

func NewInstance(name string, eng *Engine) *Instance

func (*Instance) AddExecUnit

func (i *Instance) AddExecUnit(id int32, conf map[string]interface{}, bopts *buffer.Options) *ExecUnit

func (*Instance) Start

func (i *Instance) Start()

func (*Instance) Stop

func (i *Instance) Stop()

type RingBuffer

type RingBuffer struct {
	// contains filtered or unexported fields
}

func NewRingBuffer

func NewRingBuffer(size int) *RingBuffer

func (*RingBuffer) Clear

func (w *RingBuffer) Clear()

func (*RingBuffer) Read

func (w *RingBuffer) Read(b []byte) (int, error)

func (*RingBuffer) Write

func (w *RingBuffer) Write(b []byte) (int, error)

type TagRouter

type TagRouter struct {
	// contains filtered or unexported fields
}

func (*TagRouter) Add

func (t *TagRouter) Add(re *regexp.Regexp, e Emitter)

func (*TagRouter) Route

func (t *TagRouter) Route(tag string) Emitter

Jump to

Keyboard shortcuts

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