Documentation
¶
Overview ¶
Package build includes standard mage targets useful when building plugins.
Index ¶
- Variables
- func BuildAll()
- func Clean() error
- func Coverage() error
- func Debugger() error
- func Format() error
- func Lint() error
- func ReloadPlugin() error
- func SetBeforeBuildCallback(cb BeforeBuildCallback) error
- func Test() error
- func TestRace() error
- func Watch() error
- type BeforeBuildCallback
- type Build
- func (Build) Backend() error
- func (Build) Custom(os, arch string) error
- func (Build) Darwin() error
- func (Build) DarwinARM64() error
- func (Build) Debug() error
- func (Build) DebugDarwinAMD64() error
- func (Build) DebugDarwinARM64() error
- func (Build) DebugLinuxAMD64() error
- func (Build) DebugLinuxARM64() error
- func (Build) DebugWindowsAMD64() error
- func (Build) GenerateManifestFile() error
- func (Build) Linux() error
- func (Build) LinuxARM() error
- func (Build) LinuxARM64() error
- func (Build) Windows() error
- type Config
- type Infodeprecated
- type InfoGetterdeprecated
- type InfoGetterFuncdeprecated
Constants ¶
This section is empty.
Variables ¶
var GetBuildInfo = buildinfo.GetBuildInfo
Deprecated: Use github.com/grafana/grafana-plugin-sdk-go/build/buildinfo.GetBuildInfo instead.
Functions ¶
func Debugger ¶
func Debugger() error
Debugger makes a new debug build, re-launches the plugin and attaches the Delve debugger, in headless mode listening on port 3222.
The plugin process is killed after re-building, in order to make Grafana launch the new version. Once the new version is up, we attach to it with Delve.
func ReloadPlugin ¶ added in v0.37.0
func ReloadPlugin() error
ReloadPlugin - kills any running instances and waits for grafana to reload the plugin
func SetBeforeBuildCallback ¶ added in v0.64.0
func SetBeforeBuildCallback(cb BeforeBuildCallback) error
SetBeforeBuildCallback configures a custom callback
Types ¶
type BeforeBuildCallback ¶ added in v0.64.0
BeforeBuildCallback hooks into the build process
type Build ¶
Build is a namespace.
func (Build) Custom ¶ added in v0.273.0
Custom allows customizable back-end plugin builds for the provided os and arch. Note: Cutomized builds are not officially supported by Grafana, so this option is intended for developers who need to create their own custom build targets.
func (Build) DarwinARM64 ¶ added in v0.89.0
DarwinARM64 builds the back-end plugin for OSX on ARM (M1/M2).
func (Build) DebugDarwinAMD64 ¶ added in v0.212.0
DebugDarwinAMD64 builds the debug version targeted for OSX on AMD64.
func (Build) DebugDarwinARM64 ¶ added in v0.212.0
DebugDarwinARM64 builds the debug version targeted for OSX on ARM (M1/M2).
func (Build) DebugLinuxAMD64 ¶ added in v0.212.0
DebugLinuxAMD64 builds the debug version targeted for linux on AMD64.
func (Build) DebugLinuxARM64 ¶ added in v0.212.0
DebugLinuxARM64 builds the debug version targeted for linux on ARM64.
func (Build) DebugWindowsAMD64 ¶ added in v0.212.0
DebugWindowsAMD64 builds the debug version targeted for windows on AMD64.
func (Build) GenerateManifestFile ¶ added in v0.150.0
GenerateManifestFile generates a manifest file for plugin submissions
func (Build) LinuxARM64 ¶ added in v0.77.0
LinuxARM64 builds the back-end plugin for Linux on ARM64.
type Config ¶ added in v0.64.0
type Config struct {
OS string // GOOS
Arch string // GOOS
EnableDebug bool
CustomVars map[string]string
Env map[string]string
EnableCGo bool
RootPackagePath string
OutputBinaryPath string
PluginJSONPath string
}
Config holds the setup variables required for a build
type InfoGetter
deprecated
added in
v0.192.0
type InfoGetterFunc
deprecated
added in
v0.192.0
type InfoGetterFunc = buildinfo.GetterFunc
Deprecated: Use github.com/grafana/grafana-plugin-sdk-go/build/buildinfo.GetterFunc instead.