grafana/pkg/server/doc.go
Kristin Laemmert 0de2c9eb96
feat: add ability to launch targeted dskit modules in the grafana server CLI command (#74188)
* feat: add ability to launch targeted dskit modules in the grafana server CLI command

This commit adds a ModuleServer and ModuleRunner suitable for launching dskit services and updates the server cli command to use this instead of the full Server. The default behavior is unchanged and will launch the full Grafana server. Individual services are targeted by setting target=comma,seperated,list in the config file.

* require dev mode to target dskit modules

* remove unused type

* replace setting.CommandLineArgs w/setting.Cfg; the caller can deal with calling setting.NewCfg

* Update pkg/server/module_server.go

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>

---------

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2023-09-01 08:09:54 -04:00

21 lines
978 B
Go

// Server defines the main entrypoints to Grafana and the Grafana CLI, as well
// as test environments. OSS and Enterprise-specific build tags are used in this
// package to control wire dependencies for each build.
package server
// Notes about wiresets:
//
// wire.go contains wire sets used by both OSS and Enterprise builds. These are
// generally base wiresets imported by the OSS- or Enterprise-specific sets.
//
// wireexts_oss.go contains the "extensions" wiresets, used only by OSS builds.
// wireexts_enterprise.go contains wiresets used only by Enterprise builds. This
// file is located in the grafana-enterprise repo.
//
// NOTE WELL: The extensions sets can import wiresets from wire.go, but sets in
// wire.go cannot include a build-specific wireset. The extension set must be built in wire.go.
//
// We use go build tags during build to configure which wiresets are used in a
// given build. We do not commit generated wire sets (wire_gen.go) into the
// repo.