influxqueries

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfluxQueryService

type InfluxQueryService interface {
	ExecuteQuery(client influx.Client, database, command string) ([]influx.Result, error)
	ExecuteShowQuery(influxClient influx.Client, database, query string) (*InfluxShowResult, error)
}

InfluxQueryService contains helper functions to work with the InfluxDB client

func NewInfluxQueryService

func NewInfluxQueryService() InfluxQueryService

NewInfluxQueryService creates a new implementation of the client utils struct

type InfluxShowResult

type InfluxShowResult struct {
	Values [][]string
}

InfluxShowResult contains the results/values from an 'SHOW ' query

type MockClient

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

MockClient mocks an InfluxDB client

func (*MockClient) Close

func (mc *MockClient) Close() error

Close mock

func (*MockClient) Ping

func (mc *MockClient) Ping(timeout time.Duration) (time.Duration, string, error)

Ping mock

func (*MockClient) Query

func (mc *MockClient) Query(q influx.Query) (*influx.Response, error)

Query mock

func (*MockClient) QueryAsChunk

func (mc *MockClient) QueryAsChunk(q influx.Query) (*influx.ChunkedResponse, error)

QueryAsChunk mock

func (*MockClient) Write

func (mc *MockClient) Write(bp influx.BatchPoints) error

Write mock

Jump to

Keyboard shortcuts

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