retry

package
v0.0.0-...-f584327 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncFifoRetry

type AsyncFifoRetry interface {
	// Run start retrying
	Run(ctx context.Context)

	// Append add Events
	Append(event *common.WatchEvent)

	// Size return the length of queue
	Size() int

	// MinRevision should return the revision of head
	// If queue is empty, return 0
	MinRevision() uint64
}

AsyncFifoRetry is the interface to retry uncertain operation

func NewAsyncFifoRetry

func NewAsyncFifoRetry(coder coder.Coder,
	store storage.KvStorage,
	metrics metrics.Metrics,
	tso tso.TSO,
	getter getter,
	dispatcher dispatcher,
	config Config) AsyncFifoRetry

NewAsyncFifoRetry build a fifo queue to automatically retry uncertain operations

type Config

type Config struct {
	// UnaryTimeout is the max time to send unary request
	UnaryTimeout time.Duration

	// CheckInterval is the interval of checking
	CheckInterval time.Duration

	// RetryInterval is the interval of retrying
	RetryInterval time.Duration

	// Tombstone is the tombstone
	Tombstone []byte
}

Config is the config of retry queue

Jump to

Keyboard shortcuts

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