influxlogger

package
v0.0.0-...-959073d Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToInflux

func ConnectToInflux(address, username, password string) (client.Client, error)

ConnectToInflux - return a new clinet connection to influx

Types

type InfluxD

type InfluxD interface {
	PointTickWriter(logSysStats bool) error
	NewInfluxDPoint(name string, tags map[string]string, fields map[string]interface{}, t ...time.Time) (*client.Point, error)
	PushPoint(pt *client.Point)
	//Common point methods
	CreateKafkaOffsetPoint(cgName, topic string, partition int32, currentOffset, newestOffset int64)
	CreateRPSPoint(topic, clientType string, rps int64)
}

InfluxD - interface for influx logger

type InfluxDImpl

type InfluxDImpl struct {
	// contains filtered or unexported fields
}

InfluxDImpl is a wrapper around the influx Client that provides hopefully useful functions

func NewInfluxD

func NewInfluxD(cli client.Client, database, precision string) (*InfluxDImpl, error)

NewInfluxD - returns a fully initalized influxD object

func (*InfluxDImpl) CreateKafkaOffsetPoint

func (inf *InfluxDImpl) CreateKafkaOffsetPoint(cgName, topic string, partition int32, currentOffset, newestOffset int64)

CreateKafkaOffsetPoint - creates a kafka_stats point metric

func (*InfluxDImpl) CreateRPSPoint

func (inf *InfluxDImpl) CreateRPSPoint(topic, clientType string, rps int64)

CreateRPSPoint - creates a kafka_stats point metric

func (*InfluxDImpl) NewInfluxDPoint

func (inf *InfluxDImpl) NewInfluxDPoint(name string, tags map[string]string, fields map[string]interface{}, t ...time.Time) (*client.Point, error)

NewInfluxDPoint - wrapper around influx client NewPoint (so our app doesn't need the influx client import directly)

func (*InfluxDImpl) PointTickWriter

func (inf *InfluxDImpl) PointTickWriter(logSysStats bool) error

PointTickWriter - Main points logger for influxD (lock,deliver,unlock)

func (*InfluxDImpl) PushPoint

func (inf *InfluxDImpl) PushPoint(pt *client.Point)

PushPoint - adds a point to the internal buffered chan

Jump to

Keyboard shortcuts

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