Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3394263
D6852.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6852.diff
View Options
diff --git a/services/feature-flags/src/constants.rs b/services/feature-flags/src/constants.rs
--- a/services/feature-flags/src/constants.rs
+++ b/services/feature-flags/src/constants.rs
@@ -2,3 +2,26 @@
pub const DEFAULT_LOCALSTACK_URL: &str = "http://localhost:4566";
pub const LOG_LEVEL_ENV_VAR: &str =
tracing_subscriber::filter::EnvFilter::DEFAULT_ENV;
+
+// The configuration of feature flags is stored in a table in DynamoDB.
+// Each row is identified by a compound primary key consisting of
+// partition key - platform and sort key - feature.
+// A row also contains the configuration, which is a map indexed by code
+// version with values containing boolean flags for staff and non-staff config.
+// A sample row from the db looks like this:
+// {
+// "feature": S("FEATURE_1"),
+// "configuration": M({
+// "123": M({
+// "staff": Bool(true),
+// "non-staff": Bool(false)
+// })
+// }),
+// "platform": S("ANDROID")
+// }
+pub const FEATURE_FLAGS_TABLE_NAME: &str = "feature-flags";
+pub const FEATURE_FLAGS_PLATFORM_FIELD: &str = "platform";
+pub const FEATURE_FLAGS_CONFIG_FIELD: &str = "configuration";
+pub const FEATURE_FLAGS_FEATURE_FIELD: &str = "feature";
+pub const FEATURE_FLAGS_STAFF_FIELD: &str = "staff";
+pub const FEATURE_FLAGS_NON_STAFF_FIELD: &str = "non-staff";
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 6:39 PM (21 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605815
Default Alt Text
D6852.diff (1 KB)
Attached To
Mode
D6852: [services][feature-flags] Introduce constants for accessing DynamoDB table
Attached
Detach File
Event Timeline
Log In to Comment