retry

package
v5.0.0-...-0775b3c Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 8 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 CommitFailedDeadError

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

func (*CommitFailedDeadError) Error

func (e *CommitFailedDeadError) Error() string

type Router

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

type State

type State struct {
	LastErrWasRetryable bool
	LastErr             error

	Errs                    []error
	Causes                  []string
	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, conn idb.Connection, err error, isCommitting bool)

type Throttler

type Throttler time.Duration

Jump to

Keyboard shortcuts

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