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
Add fallback function so users can customize default values. (#79)
* Add fallback function so users can customize default values.
* Clean up new unit test.
* Defer evaluation of fallback for catch-all exception.
* Update documenation for fallback function feature.
* Add unit test for context usage in fallback function.
* Fix mock requirement.
* Add pytest-mock.
- Must accept the fature name and context as an argument.
82
+
- Client will evaluate the fallback function once per call of `is_enabled()`. Please keep this in mind when creating your fallback function!
83
+
- If both a `default_value` and `fallback_function` are supplied, client will define the default value by `OR`ing the default value and the output of the fallback function.
- Must accept the fature name and context as an argument.
53
+
- Client will evaluate the fallback function once per call of `is_enabled()`. Please keep this in mind when creating your fallback function!
54
+
- If both a `default_value` and `fallback_function` are supplied, client will define the default value by `OR`ing the default value and the output of the fallback function.
55
+
44
56
## Logging
45
57
46
58
Unleash Client uses the built-in logging facility to show information about errors, background jobs (feature-flag updates and metrics), et cetera.
Copy file name to clipboardExpand all lines: docs/strategy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Method to load data on object initialization, if desired. This should parse the
16
16
17
17
The value returned by `load_provisioning()` will be stored in the _self.parsed_provisioning_ class variable when object is created. The superclass returns an empty list since most of Unleash's default strategies are list-based (in one way or another).
0 commit comments