Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Flag Sync

Auto-generated from /home/runner/work/feature-flag/feature-flag/proto/flags/v1/flag_sync.proto

Package: stitchd.flags.v1

Message: VariantValue

FieldTypeDescription
bool_valuebool
int_valueint64
double_valuedouble
string_valuestring
json_valuestringJSON serialised as string

Message: Variant

FieldTypeDescription
keystring
valueVariantValue

Message: AllocationBucket

A single bucket in a percentage rollout.

FieldTypeDescription
variant_keystringVariant key this bucket maps to.
weight_milliuint32Weight in units of 0.1% (e.g. 1000 = 100.0%, 500 = 50.0%).

Message: PercentageAllocation

Percentage allocation: deterministic hash over context keys/params. hash(targeted_keys, flag_key, project_id, environment_id) mod 100_000

FieldTypeDescription
context_hash_specsmap<string, ContextHashSpec>Context types and their parameter names to include in the hash. An empty parameter list means use the context key only.
bucketsrepeated AllocationBucket

Message: ContextHashSpec

FieldTypeDescription
parameter_namesrepeated stringIf empty, only the context key is hashed.

Message: FlagRule

FieldTypeDescription
rule_payloadbytesOpaque serialised rule payload — parsed by the client rule engine. Full typed rule messages will replace this in the rules track.
variant_keystring
allocationPercentageAllocation

Enum: FlagValueType

ValueDescription
FLAG_VALUE_TYPE_UNSPECIFIED
FLAG_VALUE_TYPE_BOOL
FLAG_VALUE_TYPE_INT
FLAG_VALUE_TYPE_DOUBLE
FLAG_VALUE_TYPE_STRING
FLAG_VALUE_TYPE_JSON

Message: FeatureFlag

FieldTypeDescription
keystring
enabledbool
value_typeFlagValueType
variantsrepeated Variant
rulesrepeated FlagRuleEvaluated in order; first match wins. Last rule is the default fallback.

Message: SyncRequest

FieldTypeDescription
contextsrepeated stitchd.common.v1.ContextContexts the client was initialised with.

Message: SyncResponse

FieldTypeDescription
flagsrepeated FeatureFlag
server_timestamp_msint64Epoch millis — client uses this to detect stale payloads.
rule_segmentsrepeated stitchd.segments.v1.RuleSegmentRule-based segment definitions for local evaluation.
list_segmentsrepeated stitchd.segments.v1.ListSegmentMetaList-based segment metadata (key + context_type only, no list entries). The SDK uses these to identify which segments require a list-check API call.
environment_idstringUUID of the resolved environment — SDK uses this in REST list-check URLs.

Service: FlagSyncService

Sync

Returns all feature flags and associated data for the calling environment. SDK key is supplied via gRPC metadata header x-sdk-key.

  • Request: SyncRequest
  • Response: SyncResponse