package gax
import "cloud.google.com/go/bigtable/internal/gax"
Package gax is a snapshot from github.com/googleapis/gax-go/v2 with minor modifications.
Package gax is a snapshot from github.com/googleapis/gax-go/v2 with minor modifications.
Index ¶
- func Invoke(ctx context.Context, stub APICall, opts ...CallOption) error
- type APICall
- type BackoffSettings
- type CallOption
- func WithDelayTimeoutSettings(initial time.Duration, max time.Duration, multiplier float64) CallOption
- func WithRetryCodes(retryCodes []codes.Code) CallOption
- type CallSettings
- type MultipliableDuration
- type RetrySettings
Functions ¶
func Invoke ¶
func Invoke(ctx context.Context, stub APICall, opts ...CallOption) error
Invoke calls stub with a child of context modified by the specified options.
Types ¶
type APICall ¶
APICall is a user defined call stub.
type BackoffSettings ¶
type BackoffSettings struct { DelayTimeoutSettings MultipliableDuration RPCTimeoutSettings MultipliableDuration }
BackoffSettings are parameters to the exponential backoff algorithm for retrying.
type CallOption ¶
type CallOption interface { Resolve(*CallSettings) }
CallOption is a generic interface for modifying the behavior of outbound calls.
func WithDelayTimeoutSettings ¶
func WithDelayTimeoutSettings(initial time.Duration, max time.Duration, multiplier float64) CallOption
WithDelayTimeoutSettings specifies:
- The initial delay time, in milliseconds, between the completion of the first failed request and the initiation of the first retrying request.
- The multiplier by which to increase the delay time between the completion of failed requests, and the initiation of the subsequent retrying request.
- The maximum delay time, in milliseconds, between requests. When this value is reached, `RetryDelayMultiplier` will no longer be used to increase delay time.
func WithRetryCodes ¶
func WithRetryCodes(retryCodes []codes.Code) CallOption
WithRetryCodes sets a list of Google API canonical error codes upon which a retry should be attempted.
type CallSettings ¶
type CallSettings struct { Timeout time.Duration RetrySettings RetrySettings }
CallSettings encapsulates the call settings for a particular API call.
func (CallSettings) Resolve ¶
func (w CallSettings) Resolve(s *CallSettings)
Resolve merges the receiver CallSettings into the given CallSettings.
type MultipliableDuration ¶
MultipliableDuration defines parameters for backoff settings.
type RetrySettings ¶
type RetrySettings struct { RetryCodes map[codes.Code]bool BackoffSettings BackoffSettings }
RetrySettings are per-call configurable settings for retrying upon transient failure.
Source Files ¶
call_option.go invoke.go
- Version
- v0.40.0
- Published
- Jun 7, 2019
- Platform
- windows/amd64
- Imports
- 4 packages
- Last checked
- 31 minutes ago –
Tools for package owners.