query

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package query defines the QueryRunner interface for running bigquery queries and converting the results into a set of key/value labels and a single float64 value suitable for converting into a prometheus.Metric.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BQRunner

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

BQRunner is a concerete implementation of QueryRunner for BigQuery.

func NewBQRunner

func NewBQRunner(client *bigquery.Client) *BQRunner

NewBQRunner creates a new QueryRunner instance.

func (*BQRunner) Query

func (qr *BQRunner) Query(query string) ([]sql.Metric, error)

Query executes the given query. Query only supports standard SQL. The query must define a column named "value" for the value, and may define additional columns, all of which are used as metric labels.

Jump to

Keyboard shortcuts

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