Skip to content

Commit 63bd0fe

Browse files
chore: Update README
1 parent 0737103 commit 63bd0fe

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,20 @@ The real work of the feature flag is actually the configuration. In your applica
5959
}
6060
```
6161

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+
6264
### Dynamic Config
6365

6466
[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.
6567

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.
6669

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.
6771

6872
### Flag Schema
6973

74+
The schema for the `toggles` config:
75+
7076
```json
7177
{
7278
"\$schema": "http://json-schema.org/draft-04/schema#",
@@ -86,11 +92,11 @@ The real work of the feature flag is actually the configuration. In your applica
8692
"fraction": {
8793
"type": "number",
8894
"minimum": 0.0,
89-
"maximum": 1.0,
90-
"exclusiveMinimum": false,
91-
"exclusiveMaxmimum": false
95+
"maximum": 1.0
9296
},
93-
"comment": { "type": "string" }
97+
"comment": {
98+
"type": "string"
99+
}
94100
},
95101
"required": [ "id", "fraction" ]
96102
}
@@ -99,3 +105,12 @@ The real work of the feature flag is actually the configuration. In your applica
99105
"required": [ "toggles" ]
100106
}
101107
```
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

Comments
 (0)