grafana

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const Port = 80

Port is the port grafana listens on.

Variables

This section is empty.

Functions

func Container

func Container(appName string, configurators ...Configurator) host.Configurator

Container runs grafana container.

Types

type Config

type Config struct {
	DataSources []DataSourceConfig
	Dashboards  []types.Dashboard
}

Config is the configuration of grafana.

type Configurator

type Configurator func(config *Config)

Configurator defines the function configuring grafana.

func Dashboards

func Dashboards(dashboards ...types.Dashboard) Configurator

Dashboards adds dashboards to grafana.

func DataSource

func DataSource(name string, sourceType DataSourceType, url string) Configurator

DataSource adds data source to grafana.

type DataSourceConfig

type DataSourceConfig struct {
	Name string
	Type DataSourceType
	URL  string
}

DataSourceConfig is the configuration of data source.

type DataSourceType

type DataSourceType string

DataSourceType defines data source type.

const (
	DataSourceLoki       DataSourceType = "loki"
	DataSourcePrometheus DataSourceType = "prometheus"
)

Supported data sources.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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