influxdb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 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"`
	Version  int    `json:"version"`

	// v1 options
	DB                  string `json:"db"`
	Username            string `json:"username"`
	Password            string `json:"password"`
	RetentionPolicyName string `json:"retentionPolicyName"`
	Precision           string `json:"precision"`

	// v2 options
	Token        string `json:"token"`
	Organization string `json:"org"`
	Bucket       string `json:"bucket"`
}

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 models.DataDownPayload

DataDownChan return nil.

func (*Integration) HandleAckEvent

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

HandleAckEvent is not implemented.

func (*Integration) HandleErrorEvent

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

HandleErrorEvent is not implemented.

func (*Integration) HandleIntegrationEvent

func (i *Integration) HandleIntegrationEvent(ctx context.Context, _ models.Integration, vars map[string]string, pl pb.IntegrationEvent) error

HandleIntegrationEvent is not implemented.

func (*Integration) HandleJoinEvent

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

HandleJoinEvent is not implemented.

func (*Integration) HandleLocationEvent

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

HandleLocationEvent is not implemented.

func (*Integration) HandleStatusEvent

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

HandleStatusEvent writes the device-status into InfluxDB.

func (*Integration) HandleTxAckEvent

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

HandleTxAckEvent is not implemented.

func (*Integration) HandleUplinkEvent

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

HandleUplinkEvent writes the uplink into InfluxDB.

Jump to

Keyboard shortcuts

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