Documentation
¶
Overview ¶
Package k6registry contains the data model of the k6 extensions registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extension ¶
type Extension struct {
// Cloud-enabled extension flag.
//
// A value of true indicates that the extension is also available in the Grafana
// k6 cloud.
//
Cloud bool `json:"cloud,omitempty" yaml:"cloud,omitempty" mapstructure:"cloud,omitempty"`
// Brief description of the extension.
//
Description string `json:"description" yaml:"description" mapstructure:"description"`
// List of JavaScript import paths registered by the extension.
//
// Currently, paths must start with the prefix `k6/x/`.
// The extensions used by k6 scripts are automatically detected based on the
// values specified here, therefore it is important that the values used here are
// consistent with the values registered by the extension at runtime.
//
Imports []string `json:"imports,omitempty" yaml:"imports,omitempty" mapstructure:"imports,omitempty"`
// The extension's go module path.
//
// This is the unique identifier of the extension.
// More info about module paths: https://go.dev/ref/mod#module-path
//
// The extension has no name property, the module path or part of it can be used
// as the extension name. For example, using the first two elements of the module
// path after the host name, the name `grafana/xk6-dashboard` can be formed from
// the module path `github.com/grafana/xk6-dashboard`. This is typically the
// repository owner name and the repository name in the repository manager.
//
// The extension has no URL property, a URL can be created from the module path
// that refers to the extension within the repository manager.
//
Module string `json:"module" yaml:"module" mapstructure:"module"`
// Officially supported extension flag.
//
// A value of true indicates that the extension is officially supported by
// Grafana. Extensions owned by the `grafana` GitHub organization are not
// officially supported by Grafana by default.
//
Official bool `json:"official,omitempty" yaml:"official,omitempty" mapstructure:"official,omitempty"`
// List of output names registered by the extension.
//
// The extensions used by k6 scripts are automatically detected based on the
// values specified here, therefore it is important that the values used here are
// consistent with the values registered by the extension at runtime.
//
Outputs []string `json:"outputs,omitempty" yaml:"outputs,omitempty" mapstructure:"outputs,omitempty"`
}
Properties of the registered k6 extension.
Only those properties of the extensions are registered, which either cannot be detected automatically, or delegation to the extension is not allowed.
Properties that are available using the repository manager API are intentionally not registered.
The string like properties that are included in the generated Grafana documentation are intentionally not accessed via the API of the repository manager. It is not allowed to inject arbitrary text into the Grafana documentation site without approval. Therefore, these properties are registered (eg `description`)
type Registry ¶
type Registry struct {
// An array containing the registration data of the k6 golang extensions.
//
Extensions []Extension `json:"extensions,omitempty" yaml:"extensions,omitempty" mapstructure:"extensions,omitempty"`
}
k6 Extension Registry.
The k6 extension registry contains the most important properties of registered extensions.