Documentation ¶
Index ¶
- Constants
- func HeaderKey(flag string) string
- func IncomingCtxWithFeatureFlag(ctx context.Context, flag string) context.Context
- func IsDisabled(ctx context.Context, flag string) bool
- func IsEnabled(ctx context.Context, flag string) bool
- func OutgoingCtxWithFeatureFlag(ctx context.Context, flag string) context.Context
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" )
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 IncomingCtxWithFeatureFlag ¶ added in v1.86.0
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 ¶
IsDisabled is the inverse operation of IsEnabled
func IsEnabled ¶
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
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.
Click to show internal directories.
Click to hide internal directories.