featuretoggle

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: 35 Imported by: 0

README

This package supports the Feature toggle admin page feature.

In order to update feature toggles through the app, the PATCH handler calls a webhook that should update Grafana's configuration and restarts the instance.

For local development, set the app mode to development by adding app_mode = development to the top level of your Grafana .ini file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFeaturesStorage

func NewFeaturesStorage() *featuresStorage

NOTE! this does not depend on config or any system state! In the future, the existence of features (and their properties) can be defined dynamically

func NewTogglesStorage

func NewTogglesStorage(features *featuremgmt.FeatureManager) *togglesStorage

Types

type FeatureFlagAPIBuilder

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

This is used just so wire has something unique to return

func NewFeatureFlagAPIBuilder

func NewFeatureFlagAPIBuilder(features *featuremgmt.FeatureManager, accessControl accesscontrol.AccessControl, cfg *setting.Cfg) *FeatureFlagAPIBuilder

func RegisterAPIService

func RegisterAPIService(features *featuremgmt.FeatureManager,
	accessControl accesscontrol.AccessControl,
	apiregistration builder.APIRegistrar,
	cfg *setting.Cfg,
) *FeatureFlagAPIBuilder

func (*FeatureFlagAPIBuilder) GetAPIRoutes

func (b *FeatureFlagAPIBuilder) GetAPIRoutes() *builder.APIRoutes

Register additional routes with the server

func (*FeatureFlagAPIBuilder) GetAuthorizer

func (b *FeatureFlagAPIBuilder) GetAuthorizer() authorizer.Authorizer

func (*FeatureFlagAPIBuilder) GetDesiredDualWriterMode

func (b *FeatureFlagAPIBuilder) GetDesiredDualWriterMode(dualWrite bool, modeMap map[string]grafanarest.DualWriterMode) grafanarest.DualWriterMode

func (*FeatureFlagAPIBuilder) GetGroupVersion

func (b *FeatureFlagAPIBuilder) GetGroupVersion() schema.GroupVersion

func (*FeatureFlagAPIBuilder) GetOpenAPIDefinitions

func (b *FeatureFlagAPIBuilder) GetOpenAPIDefinitions() common.GetOpenAPIDefinitions

func (*FeatureFlagAPIBuilder) InstallSchema

func (b *FeatureFlagAPIBuilder) InstallSchema(scheme *runtime.Scheme) error

Jump to

Keyboard shortcuts

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