influxdbhandler

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package influxdbhandler implements a InfluxDB handler

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPrecision = errors.New("invalid precision value")
)

errors

Functions

This section is empty.

Types

type Handler

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

Handler implements an InfluxDB handler for writing received sensor-data into an InfluxDB database.

func NewHandler

func NewHandler(conf HandlerConfig) (*Handler, error)

NewHandler creates a new InfluxDBHandler.

func (*Handler) Close

func (h *Handler) Close() error

Close closes the handler.

func (*Handler) SendACKNotification

func (h *Handler) SendACKNotification(pl handler.ACKNotification) error

SendACKNotification is not implemented.

func (*Handler) SendDataUp

func (h *Handler) SendDataUp(pl handler.DataUpPayload) error

SendDataUp stores the uplink data into InfluxDB.

func (*Handler) SendErrorNotification

func (h *Handler) SendErrorNotification(pl handler.ErrorNotification) error

SendErrorNotification is not implemented.

func (*Handler) SendJoinNotification

func (h *Handler) SendJoinNotification(pl handler.JoinNotification) error

SendJoinNotification is not implemented.

type HandlerConfig

type HandlerConfig struct {
	Endpoint            string `json:"endpoint"`
	DB                  string `json:"db"`
	Username            string `json:"username"`
	Password            string `json:"password"`
	RetentionPolicyName string `json:"retentionPolicyName"`
	Precision           string `json:"precision"`
}

HandlerConfig contains the configuration for a InfluxDB handler.

func (HandlerConfig) Validate

func (c HandlerConfig) Validate() error

Validate validates the HandlerConfig data.

Jump to

Keyboard shortcuts

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