Commit Graph

4 Commits

Author SHA1 Message Date
Arvind Bright 8bf2b3ee6e
grpcrand: delete all of grpcrand and call the rand package directly (#7283) 2024-05-31 11:32:53 -07:00
Easwar Swaminathan 57cb4d8069
internal/backoff: add a helper to run a function with backoff (#6661) 2023-09-26 11:10:18 -07:00
Easwar Swaminathan 31911ed09e
client: add WithConnectParams to configure connection backoff and timeout (#2960)
* Implement missing pieces for connection backoff.

Spec can be found here:
https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md

Summary of changes:
* Added a new type (marked experimental), ConnectParams, which contains
  the knobs defined in the spec (except for minConnectTimeout).
* Added a new API (marked experimental), WithConnectParams() to return a
  DialOption to dial with the provided parameters.
* Added new fields to the implementation of the exponential backoff in
  internal/backoff which mirror the ones in ConnectParams.
* Marked existing APIs WithBackoffMaxDelay() and WithBackoffConfig() as
  deprecated.
* Added a default exponential backoff implementation, for easy use of
  internal callers.

Added a new backoff package which defines the backoff configuration
options, and is used by both the grpc package and the internal/backoff
package. This allows us to have all backoff related options in a
separate package.
2019-10-03 16:47:13 -07:00
Menghan Li 24f3cca1ff
internal: move backoff to internal (#2141)
So other components such as grpclb can reuse the backoff implementation.
2018-06-13 16:07:37 -07:00