Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to configure docker/clair timeouts #94

Merged
merged 1 commit into from
Apr 12, 2018
Merged

Add support to configure docker/clair timeouts #94

merged 1 commit into from
Apr 12, 2018

Conversation

ppacher
Copy link
Contributor

@ppacher ppacher commented Apr 11, 2018

This pull request adds support to configure clair (API v1) and docker timeouts using environment variables. Fixes #88

@ppacher
Copy link
Contributor Author

ppacher commented Apr 11, 2018

Actually there is one more improvement that came to my mind. With the current implementation it is not possible to disable the timeout at all. Since klar.go#L50 always ensures returning 0 (without a possibility to check if the env var has actually been set). Therefore, setting CLAIR_TIMEOUT=0 doesn't do anything and causes a default timeout of 1 minute. I'd suggest changing parseIntOption to return an int as well as bool indicating if the value has been present at all.

Another possibility would be to support golangs duration format so it's easier to specify timeouts with seconds (e.g. 2m30s).

If your fine with those changes I can update the pull request.

@hashmap hashmap merged commit 44d75f9 into optiopay:master Apr 12, 2018
@hashmap
Copy link
Contributor

hashmap commented Apr 12, 2018

Thanks for contribution! Your suggestion sound reasonable, please go ahead if you like.

@hashmap hashmap mentioned this pull request Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants