Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { common.Args // Interval QueryRequestDuration `json:"interval"` MaxDataPoints uint64 `json:"maxDataPoints"` }
Args contains the arguments for a Query.
type Column ¶
type Column struct { Text string Data interface{} }
Column is a column returned by a TableQuery. Text holds the column's header, Data holds the slice of values and should be a TimeColumn, a StringColumn or a NumberColumn.
type DataPoint ¶
DataPoint contains one entry returned by a Query.
func (DataPoint) MarshalJSON ¶
MarshalJSON converts a DataPoint to JSON.
type NumberColumn ¶
type NumberColumn []float64
NumberColumn holds a slice of number values (one per row).
type Request ¶
Request is a Query request. For each specified Target, the server will call the appropriate handler's Query or TableQuery function with the provided Args.
func (*Request) UnmarshalJSON ¶ added in v3.1.0
UnmarshalJSON unmarshalls a Request from JSON
type StringColumn ¶
type StringColumn []string
StringColumn holds a slice of string values (one per row).
type TableResponse ¶
type TableResponse struct {
Columns []Column
}
TableResponse is returned by a TableQuery, i.e. a slice of Column structures.
func (TableResponse) MarshalJSON ¶
func (t TableResponse) MarshalJSON() (output []byte, err error)
MarshalJSON converts a TableResponse to JSON.
type Target ¶
type Target struct { Name string `json:"target"` // name of the target. Type string `json:"type"` // "timeserie" or "" for timeseries. "table" for table queries. }
Target specifies the requested target name and type.
type TimeColumn ¶
TimeColumn holds a slice of time.Time values (one per row).
type TimeSeriesResponse ¶
TimeSeriesResponse is the response from a timeseries Query.
func (TimeSeriesResponse) MarshalJSON ¶
func (t TimeSeriesResponse) MarshalJSON() (output []byte, err error)
MarshalJSON converts a TimeSeriesResponse to JSON.