Documentation ¶
Index ¶
- func ConnectToInflux(address, username, password string) (client.Client, error)
- type InfluxD
- type InfluxDImpl
- func (inf *InfluxDImpl) CreateKafkaOffsetPoint(cgName, topic string, partition int32, currentOffset, newestOffset int64)
- func (inf *InfluxDImpl) CreateRPSPoint(topic, clientType string, rps int64)
- func (inf *InfluxDImpl) NewInfluxDPoint(name string, tags map[string]string, fields map[string]interface{}, ...) (*client.Point, error)
- func (inf *InfluxDImpl) PointTickWriter(logSysStats bool) error
- func (inf *InfluxDImpl) PushPoint(pt *client.Point)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectToInflux ¶
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
Click to show internal directories.
Click to hide internal directories.