influx

package
v0.0.0-...-a97d171 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InfluxGameDB     = "GameDB"
	InfluxTelegrafDB = "Telegraf"

	InfluxRetentionPolicyAllTime InfluxRetentionPolicy = "alltime"
	InfluxRetentionPolicy14Day   InfluxRetentionPolicy = "14d"

	InfluxMeasurementAPICalls      InfluxMeasurement = "api_calls"
	InfluxMeasurementApps          InfluxMeasurement = "apps"
	InfluxMeasurementChanges       InfluxMeasurement = "changes"
	InfluxMeasurementChatBot       InfluxMeasurement = "chat_bot"
	InfluxMeasurementGameDBStats   InfluxMeasurement = "gamedb-stats"
	InfluxMeasurementGroups        InfluxMeasurement = "groups"
	InfluxMeasurementPlayers       InfluxMeasurement = "players"
	InfluxMeasurementPlayerUpdates InfluxMeasurement = "player_updates"
	InfluxMeasurementRabbitQueue   InfluxMeasurement = "rabbitmq_queue"
	InfluxMeasurementSignups       InfluxMeasurement = "signups"
	InfluxMeasurementStats         InfluxMeasurement = "stats"
)

Variables

This section is empty.

Functions

func FilterAtLeastOne

func FilterAtLeastOne(vv []interface{}) bool

func GetFirstInfluxInt

func GetFirstInfluxInt(builder *influxql.Builder) (i int64, err error)

func GetInfluxTrendFromResponse

func GetInfluxTrendFromResponse(builder *influxql.Builder, padding int) (trend float64, err error)

func GetInfluxTrendFromSeries

func GetInfluxTrendFromSeries(series models.Row, padding int) (trend float64)

Padding is for charts without a start time

func GetWriter

func GetWriter() api.WriteAPI

func InfluxQuery

func InfluxQuery(builder *influxql.Builder) (resp *influx.Response, err error)

func InfluxResponseToImageChartData

func InfluxResponseToImageChartData(series models.Row) (x []time.Time, y []float64)

func InfluxWrite

func InfluxWrite(retention InfluxRetentionPolicy, point influx.Point) (resp *influx.Response, err error)

func InfluxWriteMany

func InfluxWriteMany(retention InfluxRetentionPolicy, batch influx.BatchPoints) (resp *influx.Response, err error)

func Read

func Read(builder *influxql.Builder) error

func Write

func Write(measurement InfluxMeasurement, tags map[string]string, fields map[string]interface{})

Types

type HCFilter

type HCFilter func(vv []interface{}) bool

type HighChartsJSON

type HighChartsJSON map[string][][]interface{}

func InfluxResponseToHighCharts

func InfluxResponseToHighCharts(series models.Row, trimLeft bool, filters ...HCFilter) HighChartsJSON

type HighChartsJSONMulti

type HighChartsJSONMulti struct {
	Key   string         `json:"key"`
	Value HighChartsJSON `json:"value"`
}

type InfluxMeasurement

type InfluxMeasurement string

func (InfluxMeasurement) String

func (im InfluxMeasurement) String() string

type InfluxRetentionPolicy

type InfluxRetentionPolicy string

func (InfluxRetentionPolicy) String

func (irp InfluxRetentionPolicy) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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