timeseries

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	Log  *zap.Logger
	Repo TimeseriesRepo
}

func (*Consumer) Cleanup

func (h *Consumer) Cleanup(s sarama.ConsumerGroupSession) error

func (*Consumer) ConsumeClaim

func (*Consumer) Setup

type DataPoint

type DataPoint struct {
	DeviceID  string
	MessageID uint64
	Property  string
	Timestamp time.Time
	Value     float64
	Length    float32
}

type TimeseriesRepo

type TimeseriesRepo interface {
	CreateDataPoint(ctx context.Context, datapoint *DataPoint) error
	ReadExistingDatapoint(ctx context.Context, deviceID string) (float32, error)
}

func NewTimescaleRepo

func NewTimescaleRepo(log *zap.Logger, connection string) (result TimeseriesRepo, err error)

Jump to

Keyboard shortcuts

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