Documentation
¶
Index ¶
- type Option
- func AbsoluteThresholds(steps []ThresholdStep) Option
- func ColorBackground() Option
- func ColorNone() Option
- func ColorScheme(options ...scheme.Option) Option
- func ColorValue() Option
- func DataSource(source string) Option
- func Decimals(count int) Option
- func Description(content string) Option
- func Height(height string) Option
- func Links(panelLinks ...links.Link) Option
- func NoValue(text string) Option
- func Orientation(mode OrientationMode) Option
- func RelativeThresholds(steps []ThresholdStep) Option
- func Repeat(repeat string) Option
- func Span(span float32) Option
- func SparkLine() Option
- func SparkLineYMax(value float64) Option
- func SparkLineYMin(value float64) Option
- func Text(mode TextMode) Option
- func TitleFontSize(size int) Option
- func Transparent() Option
- func Unit(unit string) Option
- func ValueFontSize(size int) Option
- func ValueType(valueType ReductionType) Option
- func WithGraphiteTarget(query string, options ...graphite.Option) Option
- func WithInfluxDBTarget(query string, options ...influxdb.Option) Option
- func WithPrometheusTarget(query string, options ...prometheus.Option) Option
- func WithStackdriverTarget(target *stackdriver.Stackdriver) Option
- type OrientationMode
- type RangeMap
- type ReductionType
- type Stat
- type TextMode
- type ThresholdStep
- type ValueMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option represents an option that can be used to configure a stat panel.
func AbsoluteThresholds ¶
func AbsoluteThresholds(steps []ThresholdStep) Option
AbsoluteThresholds changes the background and value colors dynamically within the panel, depending on the value. The threshold is defined by a series of steps values which, each having a value and an associated color.
func ColorBackground ¶
func ColorBackground() Option
ColorBackground will show the threshold's colors in the background.
func ColorNone ¶ added in v0.21.12
func ColorNone() Option
ColorNone will not color the value or the background.
func ColorScheme ¶
ColorScheme configures the color scheme.
func ColorValue ¶
func ColorValue() Option
ColorValue will show the threshold's colors on the value itself.
func DataSource ¶
DataSource sets the data source to be used by the panel.
func Description ¶
Description annotates the current visualization with a human-readable description.
func Orientation ¶
func Orientation(mode OrientationMode) Option
Orientation changes the orientation of the layout.
func RelativeThresholds ¶
func RelativeThresholds(steps []ThresholdStep) Option
RelativeThresholds changes the background and value colors dynamically within the panel, depending on the value. The threshold is defined by a series of steps values which, each having a value defined as a percentage and an associated color.
func Span ¶
Span sets the width of the panel, in grid units. Should be a positive number between 1 and 12. Example: 6.
func SparkLine ¶
func SparkLine() Option
SparkLine displays the spark line summary of the series in addition to the stat.
func SparkLineYMax ¶
SparkLineYMax defines the largest value expected on the Y axis of the spark line.
func SparkLineYMin ¶
SparkLineYMin defines the smallest value expected on the Y axis of the spark line.
func TitleFontSize ¶
TitleFontSize sets the font size used to display the title.
func ValueFontSize ¶
ValueFontSize sets the font size used to display the value.
func ValueType ¶
func ValueType(valueType ReductionType) Option
ValueType configures how the series will be reduced to a single value.
func WithGraphiteTarget ¶
WithGraphiteTarget adds a Graphite target to the graph.
func WithInfluxDBTarget ¶
WithInfluxDBTarget adds an InfluxDB target to the graph.
func WithPrometheusTarget ¶
func WithPrometheusTarget(query string, options ...prometheus.Option) Option
WithPrometheusTarget adds a prometheus query to the graph.
func WithStackdriverTarget ¶
func WithStackdriverTarget(target *stackdriver.Stackdriver) Option
WithStackdriverTarget adds a stackdriver query to the graph.
type OrientationMode ¶
type OrientationMode string
OrientationMode controls the layout.
const ( OrientationAuto OrientationMode = "" OrientationHorizontal OrientationMode = "horizontal" OrientationVertical OrientationMode = "vertical" )
type ReductionType ¶
type ReductionType int
ReductionType lets you set the function that your entire query is reduced into a single value with.
const ( // Min displays the smallest value of the series. Min ReductionType = iota // Max displays the largest value of the series. Max // Avg displays the average of the series. Avg // First displays the first value of the series. First // FirstNonNull displays the first non-null value of the series. FirstNonNull // Last displays the last value of the series. Last // LastNonNull displays the last non-null value of the series. LastNonNull // Total displays the sum of values in the series. Total // Count displays the number of value in the series. Count // Range displays the difference between the minimum and maximum values. Range )