featureflag

package
v18.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Dummy is a feature flag for demonstration and testing purposes.
	Dummy = NewFeatureFlag(
		"dummy",
		false,
	)
)
View Source
var (
	// K8sAPIProxyResponseHeaderAllowlist defines if the allowlist should be used to filter Kubernetes API proxy response headers
	// Definition: https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/feature_flags/undefined/kas_k8s_api_proxy_response_header_allowlist.yml
	K8sAPIProxyResponseHeaderAllowlist = NewFeatureFlag(
		"k8s_api_proxy_response_header_allowlist",
		false,
	)
)

Functions

func NewCheckCounter

func NewCheckCounter(meter otelmetric.Meter) (otelmetric.Int64Counter, error)

Types

type FeatureFlag

type FeatureFlag struct {
	Name    string
	Default bool
	// contains filtered or unexported fields
}

func NewFeatureFlag

func NewFeatureFlag(name string, defaultValue bool) *FeatureFlag

type Set

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

func NewSet

func NewSet(ffs map[string]bool, checkCounter otelmetric.Int64Counter) Set

func (Set) IsDisabled

func (s Set) IsDisabled(ff *FeatureFlag) bool

func (Set) IsEnabled

func (s Set) IsEnabled(ff *FeatureFlag) bool

func (Set) ToMap

func (s Set) ToMap() map[string]bool

Jump to

Keyboard shortcuts

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