Documentation ¶
Index ¶
- Variables
- func RegisterDecoder(name string, decoder func() interface{})
- func RegisterEncoder(name string, Encoder func() interface{})
- func RegisterInput(name string, input func() interface{})
- func RegisterOutput(name string, out func() interface{})
- type Decoder
- type Encoder
- type Input
- type InputRunner
- type MasterConfig
- type Message
- type Output
- type OutputRunner
- type Pipeline
- type PipelinePack
- type PluginCommonConfig
- type PluginConfig
- type Router
Constants ¶
This section is empty.
Variables ¶
View Source
var PluginTypeRegex = regexp.MustCompile("(Input|Output|Encoder|Decoder)$")
Functions ¶
func RegisterDecoder ¶
func RegisterDecoder(name string, decoder func() interface{})
func RegisterEncoder ¶
func RegisterEncoder(name string, Encoder func() interface{})
func RegisterInput ¶
func RegisterInput(name string, input func() interface{})
func RegisterOutput ¶
func RegisterOutput(name string, out func() interface{})
Types ¶
type Decoder ¶
type Decoder interface { Init(config toml.Primitive) error Decode(pack *PipelinePack) (*PipelinePack, error) }
type Encoder ¶
type Encoder interface { Init(config toml.Primitive) error Encode(pack *PipelinePack) (*PipelinePack, error) }
type Input ¶
type Input interface { Init(pcf *PluginCommonConfig, config toml.Primitive) error Run(in InputRunner) error }
type InputRunner ¶
type InputRunner interface { InChan() chan *PipelinePack RouterChan() chan *PipelinePack Start(cf toml.Primitive) }
func NewInputRunner ¶
func NewInputRunner(in, router chan *PipelinePack) InputRunner
type MasterConfig ¶
type MasterConfig struct { PoolSize int PluginChanSize int MaxMsgLoops uint BaseDir string Hostname string // contains filtered or unexported fields }
func DefaultMasterConfig ¶
func DefaultMasterConfig() (master *MasterConfig)
func (*MasterConfig) IsShuttingDown ¶
func (self *MasterConfig) IsShuttingDown() (stopping bool)
func (*MasterConfig) ShutDown ¶
func (self *MasterConfig) ShutDown()
func (*MasterConfig) SigChan ¶
func (self *MasterConfig) SigChan() chan os.Signal
type Output ¶
type Output interface { Init(pcf *PluginCommonConfig, config toml.Primitive) error Run(out OutputRunner) error }
type OutputRunner ¶
type OutputRunner interface { InChan() chan *PipelinePack Start(cf toml.Primitive) }
func NewOutputRunner ¶
func NewOutputRunner(in chan *PipelinePack) OutputRunner
type Pipeline ¶
type Pipeline struct { InputRunners []interface{} OutputRunners []interface{} DecodeRunners []interface{} EncodeRunners []interface{} // contains filtered or unexported fields }
func NewPipeLine ¶
func NewPipeLine() *Pipeline
func (*Pipeline) LoadConfig ¶
func (*Pipeline) Run ¶
func (this *Pipeline) Run(mc *MasterConfig)
func (*Pipeline) SignalWorker ¶
func (this *Pipeline) SignalWorker()
type PipelinePack ¶
type PipelinePack struct { MsgBytes []byte Msg Message RecycleChan chan *PipelinePack RefCount int32 }
func NewPipelinePack ¶
func NewPipelinePack(recycleChan chan *PipelinePack) (pack *PipelinePack)
func PipeDecoder ¶
func PipeDecoder(name string, pack *PipelinePack) (rpack *PipelinePack, err error)
func PipeEncoder ¶
func PipeEncoder(name string, pack *PipelinePack) (rpack *PipelinePack, err error)
func (*PipelinePack) Recycle ¶
func (this *PipelinePack) Recycle()
func (*PipelinePack) Zero ¶
func (this *PipelinePack) Zero()
type PluginCommonConfig ¶
type PluginConfig ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) AddInChan ¶
func (self *Router) AddInChan(inChan chan *PipelinePack)
func (*Router) AddOutChan ¶
func (self *Router) AddOutChan(matchtag string, outChan chan *PipelinePack) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.