featureflag

package
v1.86.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 6 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"
	// LinguistFileCountStats will invoke an additional git-linguist command to get the number of files per language
	LinguistFileCountStats = "linguist_file_count_stats"
	// HooksRPC will invoke update, pre receive, and post receive hooks by using RPCs
	HooksRPC = "hooks_rpc"
	// CacheInvalidator controls the tracking of repo state via gRPC
	// annotations (i.e. accessor and mutator RPC's). This enables cache
	// invalidation by changing state when the repo is modified.
	CacheInvalidator = "cache_invalidator"
	// CommitWithoutBatchCheck controls which implementation of the GetCommitCatfile needs to be used.
	// The old one with query fot Info before fetching info about Commit
	// or the new one that skips Info call and checks object type in Commit method call.
	CommitWithoutBatchCheck = "commit_without_batch_check"
	// UseCoreDeltaIslands enables support of core delta islands for 'repack'.
	UseCoreDeltaIslands = "use_core_delta_islands"
	// UseGitProtocolV2 enables support for git wire protocol v2
	UseGitProtocolV2 = "use_git_protocol_v2"
)
View Source
const (
	// HooksRPCEnvVar is the name of the environment variable we use to pass the feature flag down into gitaly-hooks
	HooksRPCEnvVar = "GITALY_HOOK_RPCS_ENABLED"
)

Variables

This section is empty.

Functions

func HeaderKey

func HeaderKey(flag string) string

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

func IncomingCtxWithFeatureFlag added in v1.86.0

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

IncomingCtxWithFeatureFlag is used to enable a feature flag in the incoming context. This is NOT meant for use in clients that transfer the context across process boundaries.

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"

func OutgoingCtxWithFeatureFlag added in v1.86.0

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

OutgoingCtxWithFeatureFlag is used to enable a feature flag in the outgoing context metadata. The returned context is meant to be used in a client where the outcoming context is transferred to an incoming context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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