influxdb18

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: MIT Imports: 10 Imported by: 0

README

Exporter implementation fot influxDB 1.8.*

Documentation

Overview

Package influx_exporter is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdjustValType

func AdjustValType(val interface{}) interface{}

AdjustValType changes the go type to compatible go type, supported by influx

Types

type Conf

type Conf struct {
	// defaultMeasurement is used when spans don't have its component set Prefix is
	// added to the measurement name
	DefaultMeasurement string
	Prefix             string
	Database           string
	Precision          string
}

func (*Conf) PrecisionOrDefault

func (c *Conf) PrecisionOrDefault() string

type Exporter

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

func New

func New(conf *Conf, client InfluxClient, errTrs klogga.Tracer) *Exporter

New not an actual tracer, should be used with Batcher conf - configures tracer, use empty struct by default client - influx client implementation, no v2 support (yet) errTrs - tracer, where influx errors will be written. Be careful about possible recursion!

func (*Exporter) Shutdown

func (t *Exporter) Shutdown(context.Context) error

func (*Exporter) Write

func (t *Exporter) Write(_ context.Context, spans []*klogga.Span) error

type InfluxClient

type InfluxClient interface {
	Write(bp influxClient.BatchPoints) (*influxClient.Response, error)
}

InfluxClient separates tracer from influx implementation, in case something would be needed in between (although it still depends on specific influx client types)

type MockInfluxClient

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

MockInfluxClient is a mock of InfluxClient interface.

func NewMockInfluxClient

func NewMockInfluxClient(ctrl *gomock.Controller) *MockInfluxClient

NewMockInfluxClient creates a new mock instance.

func (*MockInfluxClient) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInfluxClient) Write

Write mocks base method.

type MockInfluxClientMockRecorder

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

MockInfluxClientMockRecorder is the mock recorder for MockInfluxClient.

func (*MockInfluxClientMockRecorder) Write

func (mr *MockInfluxClientMockRecorder) Write(bp interface{}) *gomock.Call

Write indicates an expected call of Write.

Jump to

Keyboard shortcuts

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