Package gax contains a set of modules which aid the development of APIs for clients and servers based on gRPC and Google API conventions.
Application code will rarely need to use this library directly. However, code generated automatically from API definition files can use it to simplify code generation and to provide more convenient and idiomatic API surfaces.
const Version = "1.0.1"
Version specifies the gax version.
Invoke calls the given APICall, performing retries as specified by opts, if any.
Sleep is similar to time.Sleep, but it can be interrupted by ctx.Done() closing. If interrupted, Sleep returns ctx.Err().
XGoogHeader is for use by the Google Cloud Libraries only.
XGoogHeader formats key-value pairs. The resulting string is suitable for x-goog-api-client header.
APICall is a user defined call stub.
Backoff implements exponential backoff. The wait time between retries is a random value between 0 and the "retry envelope". The envelope starts at Initial and increases by the factor of Multiplier every retry, but is capped at Max.
CallOption is an option used by Invoke to control behaviors of RPC calls. CallOption works by modifying relevant fields of CallSettings.
WithGRPCOptions allows passing gRPC call options during client creation.
WithRetry sets CallSettings.Retry to fn.
CallSettings allow fine-grained control over how calls are made.
Retryer is used by Invoke to determine retry behavior.
OnCodes returns a Retryer that retries if and only if the previous attempt returns a GRPC error whose error code is stored in cc. Pause times between retries are specified by bo.
bo is only used for its parameters; each Retryer has its own copy.
|v2||Package gax contains a set of modules which aid the development of APIs for clients and servers based on gRPC and Google API conventions.|