[retry] Add WithMaxDuration

Most usages of retry is written with the assumption that
retry.WithMaxRetry(retry.NewContanstBackoff(time.second), N) will cease
after N seconds not N retries.

This introduces WithMaxDuration that will stop retrying after N seconds
have passed.

Change-Id: I9f0c26ef5d0e7d8d45ec7f14852552c95b212960
5 files changed
tree: 39bd41db0a0537f1ba5293cfa4860bedf09675d6
  1. artifacts/
  2. bloaty/
  3. botanist/
  4. build/
  5. buildbucket/
  6. cache/
  7. cmd/
  8. color/
  9. digest/
  10. elflib/
  11. fastboot/
  12. gcs/
  13. gndoc/
  14. isatty/
  15. logger/
  16. mdns/
  17. netboot/
  18. ninjalog/
  19. qemu/
  20. resultstore/
  21. retry/
  22. runtests/
  23. secrets/
  24. serial/
  25. symbolize/
  26. tap/
  27. telnet/
  28. testrunner/
  29. testsharder/
  30. tftp/
  31. .gitignore
  32. go.mod
  33. go.sum
  34. LICENSE
  35. manifest
  36. PATENTS
  37. README.md
README.md

tools

This repo contains tools used in Fuchsia build and development.

Go packages from here are automatically built and uploaded to CIPD and Google Storage by bots using the tools recipe. To add a tool to the build:

  • Edit the bot config.
  • Find the builder_mixins section with name: "tools".
  • Edit the JSON in properties_j to add a string to the packages list:
"fuchsia.googlesource.com/tools/cmd/your-new-tool"