grafana

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMeasurement = "prom"

Variables

This section is empty.

Functions

func NewChartBuilder

func NewChartBuilder(opts ...ChartOption) (charts.Builder, error)

func ParseGrafana

func ParseGrafana(content []byte) (*spec.Spec, error)

ParseGrafana will parse grafana dashboard json bytes as a json model struct

Types

type Builder

type Builder struct {
	Measurement string
	// contains filtered or unexported fields
}

Builder is the builder of Grafana dashboard

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a new builder

func (*Builder) Build

func (b *Builder) Build(src *spec.Spec) (map[string]any, error)

Build will build Guance Cloud dashboard from Grafana dashboard

type ChartOption

type ChartOption func(*chartOptions) error

func WithGroup

func WithGroup(g string) ChartOption

func WithMeasurement

func WithMeasurement(m string) ChartOption

func WithType

func WithType(t string) ChartOption

Jump to

Keyboard shortcuts

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