gax
packagemoduleThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
README¶
Google API Extensions for Go
Google API Extensions for Go (gax-go) is a set of modules which aids thedevelopment of APIs for clients and servers based ongRPC and Google APIconventions.
To install the API extensions, use:
go get -u github.com/googleapis/gax-goNote: Application code will rarely need to use this library directly,but the code generated automatically from API definition files can use itto 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 seeLICENSEfor more information.
Documentation¶
Overview¶
Package gax contains a set of modules which aid the development of APIsfor 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 itto simplify code generation and to provide more convenient and idiomatic API surfaces.
Index¶
Constants¶
const Version = "1.0.1"Version specifies the gax version.
Variables¶
This section is empty.
Functions¶
funcInvoke¶
func Invoke(ctxcontext.Context, callAPICall, opts ...CallOption)error
Invoke calls the given APICall,performing retries as specified by opts, if any.
funcSleep¶
Sleep is similar to time.Sleep, but it can be interrupted by ctx.Done() closing.If interrupted, Sleep returns ctx.Err().
funcXGoogHeader¶
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.
Types¶
typeBackoff¶
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.
typeCallOption¶
type CallOption =v2.CallOption
CallOption is an option used by Invoke to control behaviors of RPC calls.CallOption works by modifying relevant fields of CallSettings.
funcWithGRPCOptions¶
func WithGRPCOptions(opt ...grpc.CallOption)CallOption
WithGRPCOptions allows passing gRPC call options during client creation.
typeCallSettings¶
type CallSettings =v2.CallSettings
CallSettings allow fine-grained control over how calls are made.
typeRetryer¶
Retryer is used by Invoke to determine retry behavior.