-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add URL option for sampling strategies file (#2519)
* Add url option for sampling strategies This change will let user to provide a URL to download sampling strategies. Default strategy is the fallback option if the URL is temporarily unavailable. Signed-off-by: Deepak <sah.sslpu@gmail.com> * Update NewStrategyStore constructor This updates the logic for NewStrategyStore constructor to skip any loading/reloading logic to execute when StrategiesFile is empty. Signed-off-by: Deepak <sah.sslpu@gmail.com> * Refactor strategy store tests This refactors the strategy store tests, moving tests with URL to separate test functions. Signed-off-by: Deepak <sah.sslpu@gmail.com> * Use strings.Replace to update strategies Signed-off-by: Deepak <sah.sslpu@gmail.com> * Change strategiesJSON to a function This updates the mockStrategyServer to return a mock strategy along with a mock server. The returned strategy can be used to update it externally. Also, changed package-level var strategiesJSON to a function to return strategies JSON with a given probability. Signed-off-by: Deepak <sah.sslpu@gmail.com> * Fix linter failures Signed-off-by: Deepak <sah.sslpu@gmail.com>
- Loading branch information
Showing
4 changed files
with
241 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.