gphotosuploader / google-photos-api-client-go

Google Photos API client for your Go apps
https://pkg.go.dev/github.com/gphotosuploader/google-photos-api-client-go/v3
MIT License
41 stars 20 forks source link

Add an HTTP client with retries #44

Closed pacoorozco closed 3 years ago

pacoorozco commented 3 years ago

What issue type does this pull request address? (keep at least one, remove the others)
/kind enhancement

What is this pull request for? Which issues does it resolve? (use resolves #<issue_number> if possible)
Add retries to request to Google API. It's implementing exponential back-off with maximum 5 retries.

Does this pull request has user-facing changes? (e.g. config changes, new/modified commands, new/modified flags)
If a recoverable error happens while calling Google Photos API, this client will try to retry.

Does this pull request add new dependencies?
github.com/hashicorp/go-retryablehttp

codecov[bot] commented 3 years ago

Codecov Report

Merging #44 (d42dbf3) into release-2.0.0 (1374df8) will increase coverage by 0.18%. The diff coverage is 100.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           release-2.0.0      #44      +/-   ##
=================================================
+ Coverage          61.20%   61.39%   +0.18%     
=================================================
  Files                 11       11              
  Lines                415      417       +2     
=================================================
+ Hits                 254      256       +2     
  Misses               140      140              
  Partials              21       21              
Impacted Files Coverage Δ
client.go 25.53% <100.00%> (+3.30%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1374df8...d42dbf3. Read the comment docs.