prom

package
v0.0.0-...-31263be Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfluxDBAdaptor

type InfluxDBAdaptor struct {
	Cfg    InfluxDBAdaptorConfig
	Client influxdb.Client
	// contains filtered or unexported fields
}

InfluxDBAdaptor is a concrete struct that implementing applications.IPromAdaptor. It depends on influxdb.Client to issue http requests to InfluxDB storage to fetch matrix data under the hood.

func NewInfluxDBAdaptor

func NewInfluxDBAdaptor(cfg InfluxDBAdaptorConfig, client influxdb.Client) *InfluxDBAdaptor

NewInfluxDBAdaptor is a package-level factory method to return a pointer to InfluxDBAdaptor. It is usually called by application service on the upper layer.

func (*InfluxDBAdaptor) Query

Query implements applications.IPromAdaptor's Query method

type InfluxDBAdaptorConfig

type InfluxDBAdaptorConfig struct {
	// Timeout sets timeout duration for a single query execution
	Timeout time.Duration
	// Verbose indicates whether to output more logs or not
	Verbose bool
}

InfluxDBAdaptorConfig configures prom.InfluxDBAdaptor

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
testinghelper
Package testinghelper only for testing purpose
Package testinghelper only for testing purpose

Jump to

Keyboard shortcuts

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