retry

package
v4.4.7 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package retry handles retry operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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(database string)
}

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
	// contains filtered or unexported fields
}

func (*State) Continue

func (s *State) Continue() bool

func (*State) OnFailure

func (s *State) OnFailure(conn db.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