grafanatest

package
Version: v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotationsResponse

type AnnotationsResponse struct {
	Annotations []grafana.Annotation
}

AnnotationsResponse is an implementation of the grafana.AnnotationsResponse interface which captures the values passed to its method calls.

func (*AnnotationsResponse) WriteAnnotation

func (res *AnnotationsResponse) WriteAnnotation(a grafana.Annotation)

WriteAnnotation satisfies the grafana.AnnotationsResponse interface.

type QueryResponse

type QueryResponse struct {
	// Results is a list of values which are either of type Timeserie or Table.
	Results []interface{}
}

QueryResponse is an implementation of the grafana.QueryResponse interface which captures the values passed to its method calls.

func (*QueryResponse) Table

func (res *QueryResponse) Table(columns ...grafana.Column) grafana.TableWriter

Table satisfies the grafana.QueryResponse interface.

func (*QueryResponse) Timeserie

func (res *QueryResponse) Timeserie(target string) grafana.TimeserieWriter

Timeserie satisfies the grafana.QueryResponse interface.

type SearchResponse

type SearchResponse struct {
	Targets []string
	Values  []interface{}
}

SearchResponse is an implementation of the grafana.SearchResponse interface which captures the values passed to its method calls.

func (*SearchResponse) WriteTarget

func (res *SearchResponse) WriteTarget(target string)

WriteTarget satisfies the grafana.SearchResponse interface.

func (*SearchResponse) WriteTargetValue

func (res *SearchResponse) WriteTargetValue(target string, value interface{})

WriteTargetValue satisfies the grafana.SearchResponse interface.

type Table

type Table struct {
	Columns []grafana.Column
	Rows    [][]interface{}
}

Table values are used by a QueryResponse to capture responses to table queries.

func (*Table) WriteRow

func (t *Table) WriteRow(values ...interface{})

WriteRows satisfies the grafana.TableWriter interface.

type Timeserie

type Timeserie struct {
	Target string
	Values []float64
	Times  []time.Time
}

Timeserie values are used by a QueryResponse to capture responses to timeserie queries.

func (*Timeserie) WriteDatapoint

func (t *Timeserie) WriteDatapoint(value float64, time time.Time)

WriteDatapoint satisfies the grafana.TimeserieWriter interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL