MCPcopy
hub / github.com/rclone/rclone / GoogleDrive

Struct GoogleDrive

lib/pacer/pacers.go:149–153  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

147//
148// See https://developers.google.com/drive/v2/web/handle-errors#exponential-backoff
149type 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
156type GoogleDriveOption interface {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected