services/device/device: Retry upload when already exists

If we try to upload the same binary twice within the same second, the
second attempt will use the same object name and then fail with an
"already exists" error.

There are many ways to fix this problem:
 - We could ignore this error and assume that it is indeed the same
   binary and we don't need to upload it again.
 - We could change the timestamp to have finer granularity.
 - We could retry with a slightly different object name.

This change implements the third option.

Change-Id: Ib03108ffdb83387594571f33284f511a6d76ba31
1 file changed
tree: 915024282f9668a97b8345c3b23401afb7788c3f
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTORS
  11. envvar.go
  12. envvar_test.go
  13. LICENSE
  14. PATENTS
  15. README.md
  16. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.