retry

package
v5.8.1-11 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package retry handles retry operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryable

func IsRetryable(err error) bool

Types

type Router

type Router interface {
	Invalidate(ctx context.Context, database string) error
}

type State

type State struct {
	Errs                    []error
	MaxTransactionRetryTime time.Duration
	Log                     log.Logger
	LogName                 string
	LogId                   string
	Now                     *func() time.Time
	Sleep                   func(time.Duration)
	Throttle                Throttler
	MaxDeadConnections      int
	Router                  Router
	DatabaseName            string

	OnDeadConnection func(server string) error
	// contains filtered or unexported fields
}

func (*State) Continue

func (s *State) Continue() bool

func (*State) OnFailure

func (s *State) OnFailure(ctx context.Context, err error, conn idb.Connection, isCommitting bool)

func (*State) ProduceError

func (s *State) ProduceError() error

type Throttler

type Throttler time.Duration

Jump to

Keyboard shortcuts

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