Documentation ¶
Overview ¶
Package multihandler provides a multi handler.
Index ¶
- Constants
- func NewHandler(defaultHandler handler.Handler) handler.Handler
- type Handler
- func (w Handler) Close() error
- func (w Handler) DataDownChan() chan handler.DataDownPayload
- func (w Handler) SendACKNotification(pl handler.ACKNotification) error
- func (w Handler) SendDataUp(pl handler.DataUpPayload) error
- func (w Handler) SendErrorNotification(pl handler.ErrorNotification) error
- func (w Handler) SendJoinNotification(pl handler.JoinNotification) error
Constants ¶
View Source
const ( HTTPHandlerKind = "HTTP" InfluxDBHandlerKind = "INFLUXDB" )
Handler kinds
Variables ¶
This section is empty.
Functions ¶
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) 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.
Click to show internal directories.
Click to hide internal directories.