pluginconfig

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvidePluginManagementConfig

func ProvidePluginManagementConfig(cfg *setting.Cfg, settingProvider setting.Provider, features featuremgmt.FeatureToggles) (*config.PluginManagementCfg, error)

ProvidePluginManagementConfig returns a new config.PluginManagementCfg. It is used to provide configuration to Grafana's implementation of the plugin management system.

Types

type EnvVarsProvider

type EnvVarsProvider struct {
	// contains filtered or unexported fields
}

func NewEnvVarsProvider

func NewEnvVarsProvider(cfg *PluginInstanceCfg, license plugins.Licensing) *EnvVarsProvider

func (*EnvVarsProvider) PluginEnvVars

func (p *EnvVarsProvider) PluginEnvVars(ctx context.Context, plugin *plugins.Plugin) []string

type FakePluginRequestConfigProvider

type FakePluginRequestConfigProvider struct{}

func NewFakePluginRequestConfigProvider

func NewFakePluginRequestConfigProvider() *FakePluginRequestConfigProvider

func (*FakePluginRequestConfigProvider) PluginRequestConfig

func (s *FakePluginRequestConfigProvider) PluginRequestConfig(ctx context.Context, pluginID string, externalService *auth.ExternalService) map[string]string

PluginRequestConfig returns a map of configuration that should be passed in a plugin request.

type PluginInstanceCfg

type PluginInstanceCfg struct {
	GrafanaAppURL string
	Features      featuremgmt.FeatureToggles

	Tracing config.Tracing

	PluginSettings setting.PluginSettings

	AWSAllowedAuthProviders   []string
	AWSAssumeRoleEnabled      bool
	AWSExternalId             string
	AWSSessionDuration        string
	AWSListMetricsPageLimit   string
	AWSForwardSettingsPlugins []string

	Azure            *azsettings.AzureSettings
	AzureAuthEnabled bool

	ProxySettings setting.SecureSocksDSProxySettings

	GrafanaVersion string

	ConcurrentQueryCount int
	ResponseLimit        int64

	UserFacingDefaultError string

	DataProxyRowLimit int64

	SQLDatasourceMaxOpenConnsDefault    int
	SQLDatasourceMaxIdleConnsDefault    int
	SQLDatasourceMaxConnLifetimeDefault int

	SigV4AuthEnabled    bool
	SigV4VerboseLogging bool
}

PluginInstanceCfg contains the configuration for a plugin instance. It is used to provide configuration to the plugin instance either via env vars or via each plugin request.

func ProvidePluginInstanceConfig

func ProvidePluginInstanceConfig(cfg *setting.Cfg, settingProvider setting.Provider, features featuremgmt.FeatureToggles) (*PluginInstanceCfg, error)

ProvidePluginInstanceConfig returns a new PluginInstanceCfg.

type PluginRequestConfigProvider

type PluginRequestConfigProvider interface {
	PluginRequestConfig(ctx context.Context, pluginID string, externalService *auth.ExternalService) map[string]string
}

type RequestConfigProvider

type RequestConfigProvider struct {
	// contains filtered or unexported fields
}

func NewRequestConfigProvider

func NewRequestConfigProvider(cfg *PluginInstanceCfg) *RequestConfigProvider

func (*RequestConfigProvider) PluginRequestConfig

func (s *RequestConfigProvider) PluginRequestConfig(ctx context.Context, pluginID string, externalService *auth.ExternalService) map[string]string

PluginRequestConfig returns a map of configuration that should be passed in a plugin request. nolint:gocyclo

Jump to

Keyboard shortcuts

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