forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There is a new optional `timeout` option to specify with `http.send` which will set a client timeout on the request. This will override the default 5 second timeout. This change also corrects the request to use the builtin context. This means that if the evaluation is canceled the request will also now be canceled. There is an environment variable for adjusting the default timeout which we should aim to remove in future OPA versions (when appropriate). For now though it is still supported, and will panic if supplied with an invalid value rather than previously ignoring it and effectively disable the timeout (0 == unlimited). Fixes: open-policy-agent#2099 Signed-off-by: Patrick East <east.patrick@gmail.com>
- Loading branch information
1 parent
9c2022e
commit 7b19c10
Showing
4 changed files
with
287 additions
and
25 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
Oops, something went wrong.