Documentation ¶
Overview ¶
Package live provides types for the Grafana Live server.
Index ¶
Constants ¶
View Source
const ( // ScopeGrafana contains builtin real-time features of Grafana Core. ScopeGrafana = "grafana" // ScopePlugin passes control to a plugin. ScopePlugin = "plugin" // ScopeDatasource passes control to a datasource plugin. ScopeDatasource = "ds" // ScopeStream is a managed data frame stream. ScopeStream = "stream" )
Variables ¶
View Source
var ErrInvalidChannelID = errors.New("invalid channel ID")
ErrInvalidChannelID returned when channel ID does not have valid format. Valid channel IDs have 3 parts (scope, namespace, path) delimited by "/". Scope and namespace parts can only have alphanumeric ascii symbols, underscore and dash. Path can additionally have "/", "=" and ".".
Functions ¶
This section is empty.
Types ¶
type Channel ¶ added in v0.92.0
type Channel struct { // Scope is one of available channel scopes: // like ScopeGrafana, ScopePlugin, ScopeDatasource, ScopeStream. Scope string `json:"scope,omitempty"` // Namespace meaning depends on the scope. // * when ScopeGrafana, namespace is a "feature" // * when ScopePlugin, namespace is the plugin name // * when ScopeDatasource, namespace is the datasource uid // * when ScopeStream, namespace is the stream ID. Namespace string `json:"namespace,omitempty"` // Within each scope and namespace, the handler can process the path as needed. Path string `json:"path,omitempty"` }
Channel is the channel ID split by parts.
func ParseChannel ¶ added in v0.92.0
ParseChannel parses the parts from a channel ID:
${scope} / ${namespace} / ${path}.
Channel parts allowed to have alphanumeric symbols, underscore and dash. For invalid channel IDs function returns ErrInvalidChannelID.
Click to show internal directories.
Click to hide internal directories.