timestream

package
v0.0.0-...-708cfa6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 9 Imported by: 0

README

timestream

Simple package that provides a simple, buffered interface towards AWS timestream.

Usage:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimestreamEntry

type TimestreamEntry struct {
	Time      time.Time
	SensorId  string
	TableName string
	Value     string
}

type TimestreamState

type TimestreamState struct {
	AwsRegion           string
	AwsTimestreamDbname string
	WriteSession        *timestreamwrite.TimestreamWrite
	WriteBuffer         map[string][]*timestreamwrite.Record // a hash with table name as key.
	Transport           *http.Transport
}

func Factory

func Factory(awsRegion string, awsTimestreamDbname string) TimestreamState

func (*TimestreamState) CheckAndCreateTables

func (c *TimestreamState) CheckAndCreateTables(tables []string) error

get a list of the tables in the database and create the ones we need if they don't exist.

func (*TimestreamState) FlushAwsTimestreamWrites

func (c *TimestreamState) FlushAwsTimestreamWrites() []error

func (*TimestreamState) MakeEntry

func (c *TimestreamState) MakeEntry(entry TimestreamEntry)

Jump to

Keyboard shortcuts

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