package gax

import "cloud.google.com/go/bigtable/internal/gax"

This is ia snapshot from github.com/googleapis/gax-go with minor modifications.

This is ia snapshot from github.com/googleapis/gax-go with minor modifications.

Index

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

type APICall func(context.Context) error

A user defined call stub.

type BackoffSettings

type BackoffSettings struct {
	DelayTimeoutSettings MultipliableDuration
	RPCTimeoutSettings   MultipliableDuration
}

Parameters to the exponential backoff algorithm for retrying.

type CallOption

type CallOption interface {
	Resolve(*CallSettings)
}

func WithDelayTimeoutSettings

func WithDelayTimeoutSettings(initial time.Duration, max time.Duration, multiplier float64) CallOption

WithDelayTimeoutSettings specifies:

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
}

Encapsulates the call settings for a particular API call.

func (CallSettings) Resolve

func (w CallSettings) Resolve(s *CallSettings)

type MultipliableDuration

type MultipliableDuration struct {
	Initial    time.Duration
	Max        time.Duration
	Multiplier float64
}

type RetrySettings

type RetrySettings struct {
	RetryCodes      map[codes.Code]bool
	BackoffSettings BackoffSettings
}

Per-call configurable settings for retrying upon transient failure.

Source Files

call_option.go invoke.go

Version
v0.18.0
Published
Jan 19, 2018
Platform
windows/amd64
Imports
7 packages
Last checked
14 minutes ago

Tools for package owners.