modulepackage
2.14.1+incompatible
Repository: https://github.com/googleapis/gax-go.git
Documentation: pkg.go.dev
# README
Google API Extensions for Go
Google API Extensions for Go (gax-go) is a set of modules which aids the
development of APIs for clients and servers based on gRPC
and Google API
conventions.
To install the API extensions, use:
go get -u github.com/googleapis/gax-go/v2
Note: Application code will rarely need to use this library directly, but the code generated automatically from API definition files can use it to simplify code generation and to provide more convenient and idiomatic API surface.
Go Versions
This library requires Go 1.6 or above.
License
BSD - please see LICENSE for more information.
# Functions
Invoke calls the given APICall, performing retries as specified by opts, if any.
OnCodes returns a Retryer that retries if and only if the previous attempt returns a GRPC error whose error code is stored in cc.
Sleep is similar to time.Sleep, but it can be interrupted by ctx.Done() closing.
WithGRPCOptions allows passing gRPC call options during client creation.
WithRetry sets CallSettings.Retry to fn.
XGoogHeader is for use by the Google Cloud Libraries only.
# Constants
Version specifies the gax version.
# Type aliases
APICall is a user defined call stub.
Backoff implements exponential backoff.
CallOption is an option used by Invoke to control behaviors of RPC calls.
CallSettings allow fine-grained control over how calls are made.
Retryer is used by Invoke to determine retry behavior.