influxdb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MeasurementLink               = "link"        // Measurement for per-link statistics
	MeasurementNode               = "node"        // Measurement for per-node statistics
	MeasurementGlobal             = "global"      // Measurement for summarized global statistics
	CounterMeasurementFirmware    = "firmware"    // Measurement for firmware statistics
	CounterMeasurementModel       = "model"       // Measurement for model statistics
	CounterMeasurementAutoupdater = "autoupdater" // Measurement for autoupdater

)

Variables

This section is empty.

Functions

func Connect

func Connect(configuration map[string]interface{}) (database.Connection, error)

func GlobalStatsFields

func GlobalStatsFields(stats *runtime.GlobalStats) map[string]interface{}

GlobalStatsFields returns fields for InfluxDB

Types

type Config

type Config map[string]interface{}

func (Config) Address

func (c Config) Address() string

func (Config) Database

func (c Config) Database() string

func (Config) Password

func (c Config) Password() string

func (Config) Tags

func (c Config) Tags() map[string]interface{}

func (Config) Username

func (c Config) Username() string

type Connection

type Connection struct {
	database.Connection
	// contains filtered or unexported fields
}

func (*Connection) Close

func (conn *Connection) Close()

Close all connection and clean up

func (*Connection) InsertGlobals

func (conn *Connection) InsertGlobals(stats *runtime.GlobalStats, time time.Time, site string, domain string)

InsertGlobals implementation of database

func (conn *Connection) InsertLink(link *runtime.Link, t time.Time)

InsertLink adds a link data point

func (*Connection) InsertNode

func (conn *Connection) InsertNode(node *runtime.Node)

InsertNode stores statistics and neighbours in the database

func (*Connection) PruneNodes

func (conn *Connection) PruneNodes(deleteAfter time.Duration)

PruneNodes prunes historical per-node data

Jump to

Keyboard shortcuts

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