dropsonde_unmarshaller

package
v0.0.0-...-6af1f78 Latest Latest
Warning

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

Go to latest
Published: May 26, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dropsonde_unmarshaller provides a tool for unmarshalling Envelopes from Protocol Buffer messages.

Use

Instantiate a Marshaller and run it:

unmarshaller := dropsonde_unmarshaller.NewDropsondeUnMarshaller(logger)
inputChan :=  make(chan []byte) // or use a channel provided by some other source
outputChan := make(chan *events.Envelope)
go unmarshaller.Run(inputChan, outputChan)

The unmarshaller self-instruments, counting the number of messages processed and the number of errors. These can be accessed through the Emit function on the unmarshaller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropsondeUnmarshaller

type DropsondeUnmarshaller interface {
	instrumentation.Instrumentable
	Run(inputChan <-chan []byte, outputChan chan<- *events.Envelope)
	UnmarshallMessage([]byte) (*events.Envelope, error)
}

A DropsondeUnmarshaller is an self-instrumenting tool for converting Protocol Buffer-encoded dropsonde messages to Envelope instances.

func NewDropsondeUnmarshaller

func NewDropsondeUnmarshaller(logger *gosteno.Logger) DropsondeUnmarshaller

NewDropsondeUnmarshaller instantiates a DropsondeUnmarshaller and logs to the provided logger.

type DropsondeUnmarshallerCollection

type DropsondeUnmarshallerCollection interface {
	instrumentation.Instrumentable
	Run(inputChan <-chan []byte, outputChan chan<- *events.Envelope, waitGroup *sync.WaitGroup)
	Size() int
}

A DropsondeUnmarshallerCollection is a collection of DropsondeUnmarshaller instances.

func NewDropsondeUnmarshallerCollection

func NewDropsondeUnmarshallerCollection(logger *gosteno.Logger, size int) DropsondeUnmarshallerCollection

NewDropsondeUnmarshallerCollection instantiates a DropsondeUnmarshallerCollection, creates the specified number of DropsondeUnmarshaller instances and logs to the provided logger.

Jump to

Keyboard shortcuts

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