featgate

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FeatGateEnvVarsPrefix = caps.ToScreamingSnake(common.Brand) + "_FEAT_"
	// Contains all defined feature gates.
	FeatGates                   = []*FeatGate{}
	FeatGatePeriodicStackTraces = NewFeatGate(
		"periodic-stack-traces",
		`Print stack traces periodically to help with debugging deadlocks and other issues`,
	)
	FeatGateTypescript = NewFeatGate(
		"typescript",
		`Enable TypeScript chart rendering from ts/ directory`,
	)
	FeatGateAdoptDeckhouseControllerFields = NewFeatGate(
		"adopt-deckhouse-controller-fields",
		`Adopt managed fields owned by the legacy "deckhouse-controller" field manager (the pre-nelm Helm 3 engine). Unsafe if any resource still has hook-owned "deckhouse-controller" entries`,
	)
)

Functions

This section is empty.

Types

type FeatGate

type FeatGate struct {
	Help string
	Name string
	// contains filtered or unexported fields
}

A feature gate, which enabled/disables a specific feature. Can be toggled via an env var or programmatically.

func NewFeatGate

func NewFeatGate(name, help string) *FeatGate

func (*FeatGate) Default

func (g *FeatGate) Default() bool

func (*FeatGate) Disable

func (g *FeatGate) Disable()

func (*FeatGate) Enable

func (g *FeatGate) Enable()

func (*FeatGate) Enabled

func (g *FeatGate) Enabled() bool

func (*FeatGate) EnvVarName

func (g *FeatGate) EnvVarName() string

Jump to

Keyboard shortcuts

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