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 ¶
func (receiver *InfluxDBAdaptor) Query(ctx context.Context, cmd applications.PromCommand) (applications.RunResult, error)
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 |
Click to show internal directories.
Click to hide internal directories.