processor

package
v0.0.0-...-1d9613f Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	// contains filtered or unexported methods
}

Encoder turns a message into a raw byte array ready to be sent.

func NewEncoder

func NewEncoder(useProto bool) Encoder

NewEncoder returns an encoder.

type Prefixer

type Prefixer interface {
	// contains filtered or unexported methods
}

Prefixer adds a prefix to a message.

func NewAPIKeyPrefixer

func NewAPIKeyPrefixer(apikey, logset string) Prefixer

NewAPIKeyPrefixer returns a prefixer that prepends the given API key to a message.

type Processor

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

A Processor updates messages from an inputChan and pushes in an outputChan.

func New

func New(inputChan, outputChan chan message.Message, encoder Encoder, prefixer Prefixer) *Processor

New returns an initialized Processor.

func (*Processor) Start

func (p *Processor) Start()

Start starts the Processor.

func (*Processor) Stop

func (p *Processor) Stop()

Stop stops the Processor, this call blocks until inputChan is flushed

Jump to

Keyboard shortcuts

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