retry

package
v3.37.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(err error) (
	statusCode int64,
	operationStatus operation.Status,
	backoffType backoff.Type,
	deleteSession bool,
)

Check returns retry mode for err.

func IsIdempotent added in v3.34.0

func IsIdempotent(ctx context.Context) bool

func MustDeleteSession added in v3.34.0

func MustDeleteSession(err error) bool

func MustRetry added in v3.34.0

func MustRetry(err error, isOperationIdempotent bool) bool

func WithIdempotent added in v3.34.0

func WithIdempotent(ctx context.Context, idempotent bool) context.Context

Types

type Mode

type Mode struct {
	// contains filtered or unexported fields
}

Mode reports whether operation is able retried and with which properties.

func NewMode

func NewMode(statusCode int64, operationStatus operation.Status, backoff backoff.Type, deleteSession bool) Mode

func (Mode) BackoffType

func (m Mode) BackoffType() backoff.Type

func (Mode) MustBackoff

func (m Mode) MustBackoff() bool

func (Mode) MustDeleteSession

func (m Mode) MustDeleteSession() bool

func (Mode) MustRetry

func (m Mode) MustRetry(isOperationIdempotent bool) bool

func (Mode) StatusCode

func (m Mode) StatusCode() int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL