modules

package
v0.0.0-testrgm3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// All includes all modules necessary for Grafana to run as a standalone application.
	All string = "all"
	// BackgroundServices includes all Grafana services that run in the background
	BackgroundServices string = "background-services"
	// CertGenerator generates certificates for grafana-apiserver
	CertGenerator string = "cert-generator"
	// GrafanaAPIServer is the Kubertenes API server for Grafana Resources
	GrafanaAPIServer string = "grafana-apiserver"
	// HTTPServer is the HTTP server for Grafana
	HTTPServer string = "http-server"
	// Provisioning sets up Grafana with preconfigured datasources, dashboards, etc.
	Provisioning string = "provisioning"
)

Variables

View Source
var WireSet = wire.NewSet(
	ProvideService,
	wire.Bind(new(Engine), new(*service)),
	wire.Bind(new(Manager), new(*service)),
)

Functions

func ProvideService

func ProvideService(
	cfg *setting.Cfg,
	features *featuremgmt.FeatureManager,
) *service

Types

type Engine

type Engine interface {
	Init(context.Context) error
	Run(context.Context) error
	Shutdown(context.Context) error
}

type Manager

type Manager interface {
	RegisterModule(name string, initFn func() (services.Service, error))
	RegisterInvisibleModule(name string, initFn func() (services.Service, error))
}

type MockModuleEngine

type MockModuleEngine struct {
	InitFunc     func(context.Context) error
	RunFunc      func(context.Context) error
	ShutdownFunc func(context.Context) error
}

func (*MockModuleEngine) Init

func (m *MockModuleEngine) Init(ctx context.Context) error

func (*MockModuleEngine) Run

func (m *MockModuleEngine) Run(ctx context.Context) error

func (*MockModuleEngine) Shutdown

func (m *MockModuleEngine) Shutdown(ctx context.Context) error

type MockModuleManager

type MockModuleManager struct {
	RegisterModuleFunc          func(name string, initFn func() (services.Service, error))
	RegisterInvisibleModuleFunc func(name string, initFn func() (services.Service, error))
}

func (*MockModuleManager) RegisterInvisibleModule

func (m *MockModuleManager) RegisterInvisibleModule(name string, initFn func() (services.Service, error))

func (*MockModuleManager) RegisterModule

func (m *MockModuleManager) RegisterModule(name string, initFn func() (services.Service, error))

type MockNamedService

type MockNamedService struct {
	*services.BasicService
}

func NewMockNamedService

func NewMockNamedService(name string) *MockNamedService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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