grafana

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Route = "/grafana"
)

Route is the route under which the plugin should be registered in our router for the rest api.

Variables

This section is empty.

Functions

func Register

func Register(plugins *plugin.Plugins, config Config) chi.Router

Register returns a new router for the Grafana plugin, which can be used in the router for the kobs rest api. For each instance we are adding the "internalAddress" and the "publicAddress" to the options, so that they can be used in the frontend.

Types

type Config

type Config []instance.Config

Config is the structure of the configuration for the grafana plugin.

type Router

type Router struct {
	*chi.Mux
	Instances []instance.Instance
}

Router implements the router for the Grafana plugin, which can be registered in the router for our rest api. Next to the http routes it also contains a list of all registered instances for the Grafana plugin.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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