featureflag

package
v1.68.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UploadPackFilter enables partial clones by sending uploadpack.allowFilter and uploadpack.allowAnySHA1InWant
	// to upload-pack
	UploadPackFilter = "upload_pack_filter"
	// GetAllLFSPointersGo will cause the GetAllLFSPointers RPC to use the go implementation when set
	GetAllLFSPointersGo = "get_all_lfs_pointers_go"

	// LinguistFileCountStats will invoke an additional git-linguist command to get the number of files per language
	LinguistFileCountStats = "linguist_file_count_stats"
)

Variables

This section is empty.

Functions

func ContextWithFeatureFlag added in v1.67.0

func ContextWithFeatureFlag(ctx context.Context, flag string) context.Context

ContextWithFeatureFlag is used in tests to enablea a feature flag in the context metadata

func HeaderKey

func HeaderKey(flag string) string

HeaderKey returns the feature flag key to be used in the metadata map

func IsDisabled

func IsDisabled(ctx context.Context, flag string) bool

IsDisabled is the inverse operation of IsEnabled

func IsEnabled

func IsEnabled(ctx context.Context, flag string) bool

IsEnabled checks if the feature flag is enabled for the passed context. Only return true if the metadata for the feature flag is set to "true"

Types

This section is empty.

Jump to

Keyboard shortcuts

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