multihandler

package
v2.4.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package multihandler provides a multi handler.

Index

Constants

View Source
const (
	HTTPHandlerKind     = "HTTP"
	InfluxDBHandlerKind = "INFLUXDB"
)

Handler kinds

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(defaultHandler handler.Handler) handler.Handler

NewHandler returns a new MultiHandler.

Types

type Handler

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

Handler wraps multiple handlers inside a single handler so that data can be sent to multiple endpoints simultaneously. Note that errors are logged, but not returned.

func (Handler) Close

func (w Handler) Close() error

Close closes the handlers.

func (Handler) DataDownChan

func (w Handler) DataDownChan() chan handler.DataDownPayload

DataDownChan returns the channel containing the received DataDownPayload.

func (Handler) SendACKNotification

func (w Handler) SendACKNotification(pl handler.ACKNotification) error

SendACKNotification sends an ACK notification.

func (Handler) SendDataUp

func (w Handler) SendDataUp(pl handler.DataUpPayload) error

SendDataUp sends a data-up payload.

func (Handler) SendErrorNotification

func (w Handler) SendErrorNotification(pl handler.ErrorNotification) error

SendErrorNotification sends an error notification.

func (Handler) SendJoinNotification

func (w Handler) SendJoinNotification(pl handler.JoinNotification) error

SendJoinNotification sends a join notification.

func (Handler) SendLocationNotification

func (w Handler) SendLocationNotification(pl handler.LocationNotification) error

SendLocationNotification sends a location notification.

func (Handler) SendStatusNotification

func (w Handler) SendStatusNotification(pl handler.StatusNotification) error

SendStatusNotification sends a status notification.

Jump to

Keyboard shortcuts

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