You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-4Lines changed: 19 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,14 +59,20 @@ The real work of the feature flag is actually the configuration. In your applica
59
59
}
60
60
```
61
61
62
+
Each `Toggle` must have an `id` and a `fraction`, the number indicating how often to return `true`. The `fraction` is a number from `0.0` to `1.0`. So in the example the value `0.1` indicates that this `Toggle` will be `true` 10% of the time it is called.
63
+
62
64
### Dynamic Config
63
65
64
66
[DynamicConfig](https://github.com/creditkarma/dynamic-config) is a pluggable config library for Node.js that allows for runtime changes to config values. This is the basis for our feature flags support. It certainly isn't required that you use Dyanmic Config for all of your application config, but that would be recommended.
65
67
68
+
You should check out the docs for DynamicConifg if you are going to use this library. The gist is this. DynamicConfig has plugable support for remote data stores for configuration values. These external data stores can have their values updated without having to restart the application. The feature flags library will be updated if the remote values change and the ramp of your toggles will be updated in real time.
66
69
70
+
The only time there is a performance penalty for loading the external config is during the creation of a `Toggle`. After this initial penalty updated values are loaded in the background.
@@ -86,11 +92,11 @@ The real work of the feature flag is actually the configuration. In your applica
86
92
"fraction": {
87
93
"type": "number",
88
94
"minimum": 0.0,
89
-
"maximum": 1.0,
90
-
"exclusiveMinimum": false,
91
-
"exclusiveMaxmimum": false
95
+
"maximum": 1.0
92
96
},
93
-
"comment": { "type": "string" }
97
+
"comment": {
98
+
"type": "string"
99
+
}
94
100
},
95
101
"required": [ "id", "fraction" ]
96
102
}
@@ -99,3 +105,12 @@ The real work of the feature flag is actually the configuration. In your applica
99
105
"required": [ "toggles" ]
100
106
}
101
107
```
108
+
109
+
## Contributing
110
+
111
+
For more information about contributing new features and bug fixes, see our [Contribution Guidelines](https://github.com/creditkarma/CONTRIBUTING.md).
112
+
External contributors must sign Contributor License Agreement (CLA)
113
+
114
+
## License
115
+
116
+
This project is licensed under [Apache License Version 2.0](./LICENSE)
0 commit comments