Documentation
¶
Index ¶
- type Aggregation
- type AggregationType
- type Option
- func AsAnnotations() Option
- func AsJSON() Option
- func AsTable() Option
- func AsTimeSeriesAggregations(aggregations []Aggregation) Option
- func DataSource(source string) Option
- func Editable() Option
- func Height(height string) Option
- func HideColumn(columnLabelPattern string) Option
- func ReadOnly() Option
- func Span(span float32) Option
- func TimeSeriesToColumns() Option
- func TimeSeriesToRows() Option
- func WithPrometheusTarget(query string, options ...prometheus.Option) Option
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregation ¶
type Aggregation struct { Label string Type AggregationType }
type AggregationType ¶
type AggregationType string
AggregationType represents an aggregation function used on values returned by the query.
const AVG AggregationType = "avg"
AVG aggregates results by computing the average.
const Count AggregationType = "count"
Count aggregates results by counting them.
const Current AggregationType = "current"
Current aggregates results by keeping only the current value.
const Max AggregationType = "max"
Max aggregates results by keeping only the largest value.
const Min AggregationType = "min"
Min aggregates results by keeping only the smallest value.
type Option ¶
type Option func(table *Table)
Option represents an option that can be used to configure a table panel.
func AsTimeSeriesAggregations ¶
func AsTimeSeriesAggregations(aggregations []Aggregation) Option
AsTimeSeriesAggregations displays the data according to the given aggregation methods.
func DataSource ¶
DataSource sets the data source to be used by the table.
func HideColumn ¶
HideColumn hides the column having a label matching the given pattern.
func Span ¶
Span sets the width of the panel, in grid units. Should be a positive number between 1 and 12. Example: 6.
func TimeSeriesToColumns ¶
func TimeSeriesToColumns() Option
TimeSeriesToColumns displays the data in columns.
func WithPrometheusTarget ¶
func WithPrometheusTarget(query string, options ...prometheus.Option) Option
WithPrometheusTarget adds a prometheus target to the table.