GoogleDrive is a specialized pacer for Google Drive It implements a truncated exponential backoff strategy with randomization. Normally operations are paced at the interval set with SetMinSleep. On errors the sleep timer is set to (2 ^ n) + random_number_milliseconds seconds. See https://developer
| 147 | // |
| 148 | // See https://developers.google.com/drive/v2/web/handle-errors#exponential-backoff |
| 149 | type GoogleDrive struct { |
| 150 | minSleep time.Duration // minimum sleep time |
| 151 | burst int // number of requests without sleeping |
| 152 | limiter *rate.Limiter // rate limiter for the minSleep |
| 153 | } |
| 154 | |
| 155 | // GoogleDriveOption is the interface implemented by all options for the GoogleDrive Calculator |
| 156 | type GoogleDriveOption interface { |
nothing calls this directly
no outgoing calls
no test coverage detected