dropsonde_marshaller

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dropsonde_marshaller provides a tool for marshalling Envelopes to Protocol Buffer messages.

Use

Instantiate a Marshaller and run it:

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropsondeMarshaller

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

A DropsondeMarshaller is an self-instrumenting tool for converting dropsonde Envelopes to binary (Protocol Buffer) messages.

func NewDropsondeMarshaller

func NewDropsondeMarshaller(logger *gosteno.Logger) *DropsondeMarshaller

NewDropsondeMarshaller instantiates a DropsondeMarshaller and logs to the provided logger.

func (*DropsondeMarshaller) Run

func (u *DropsondeMarshaller) Run(inputChan <-chan *events.Envelope, outputChan chan<- []byte)

Run reads Envelopes from inputChan, marshals them to Protocol Buffer format, and emits the binary messages onto outputChan. It operates one message at a time, and will block if outputChan is not read.

Jump to

Keyboard shortcuts

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