influxdb

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package influxdb implements a InfluxDB integration.

Index

Constants

This section is empty.

Variables

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

errors

Functions

This section is empty.

Types

type Config

type Config 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"`
}

Config contains the configuration for the InfluxDB integration.

func (Config) Validate

func (c Config) Validate() error

Validate validates the HandlerConfig data.

type Integration

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

Integration implements an InfluxDB integration.

func New

func New(conf Config) (*Integration, error)

New creates a new InfluxDB integration.

func (*Integration) Close

func (i *Integration) Close() error

Close closes the handler.

func (*Integration) DataDownChan

func (i *Integration) DataDownChan() chan integration.DataDownPayload

DataDownChan return nil.

func (*Integration) SendACKNotification

func (i *Integration) SendACKNotification(ctx context.Context, vars map[string]string, pl pb.AckEvent) error

SendACKNotification is not implemented.

func (*Integration) SendDataUp

func (i *Integration) SendDataUp(ctx context.Context, vars map[string]string, pl pb.UplinkEvent) error

SendDataUp stores the uplink data into InfluxDB.

func (*Integration) SendErrorNotification

func (i *Integration) SendErrorNotification(ctx context.Context, vars map[string]string, pl pb.ErrorEvent) error

SendErrorNotification is not implemented.

func (*Integration) SendJoinNotification

func (i *Integration) SendJoinNotification(ctx context.Context, vars map[string]string, pl pb.JoinEvent) error

SendJoinNotification is not implemented.

func (*Integration) SendLocationNotification

func (i *Integration) SendLocationNotification(ctx context.Context, vars map[string]string, pl pb.LocationEvent) error

SendLocationNotification is not implemented.

func (*Integration) SendStatusNotification

func (i *Integration) SendStatusNotification(ctx context.Context, vars map[string]string, pl pb.StatusEvent) error

SendStatusNotification writes the device-status.

func (*Integration) SendTxAckNotification

func (i *Integration) SendTxAckNotification(ctx context.Context, vars map[string]string, pl pb.TxAckEvent) error

SendTxAckNotification is not implemented.

Jump to

Keyboard shortcuts

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