Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecoderFunc ¶
type DecoderFunc func(Message interface{}) error
type DecoderParams ¶
type DecoderParams struct { DecoderFunc DecoderFunc DoneCallback DoneCallback ErrorCallback ErrorCallback }
Decoder structure. Define the function to call and the config specific to the type of packets.
type MessageDecoded ¶
type MessageDecoded interface{}
type Processor ¶
type Processor struct { DecoderParams DecoderParams Name string // contains filtered or unexported fields }
Processor structure
func CreateProcessor ¶
func CreateProcessor(numWorkers int, decoderParams DecoderParams, name string) Processor
Create a message processor which is going to create all the workers and set-up the pool.
func (Processor) ProcessMessage ¶
Send a message to be decoded to the pool.
type Worker ¶
type Worker struct { Id int DecoderParams DecoderParams WorkerPool chan chan Message Name string InMsg chan Message Quit chan bool }
Worker structure
func CreateWorker ¶
func CreateWorker(workerPool chan chan Message, decoderParams DecoderParams, id int, name string) Worker
Create a worker and add it to the pool.
Click to show internal directories.
Click to hide internal directories.