retrypolicy

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Overview

(c) Cartesi and individual authors (see AUTHORS) SPDX-License-Identifier: Apache-2.0 (see LICENSE)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationRetryPolicyDelegator

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

func NewApplicationWithRetryPolicy

func NewApplicationWithRetryPolicy(
	delegate evmreader.ApplicationContract,
	maxRetries uint64,
	delayBetweenCalls time.Duration,
) *ApplicationRetryPolicyDelegator

func (*ApplicationRetryPolicyDelegator) GetConsensus

func (d *ApplicationRetryPolicyDelegator) GetConsensus(opts *bind.CallOpts,
) (common.Address, error)

func (*ApplicationRetryPolicyDelegator) RetrieveOutputExecutionEvents

func (d *ApplicationRetryPolicyDelegator) RetrieveOutputExecutionEvents(
	opts *bind.FilterOpts,
) ([]*iapplication.IApplicationOutputExecuted, error)

type ConsensusRetryPolicyDelegator

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

A Consensus Delegator that calls GetEpochLength with the retry policy defined by util.RetryFunction

func NewConsensusWithRetryPolicy

func NewConsensusWithRetryPolicy(
	delegate evmreader.ConsensusContract,
	maxRetries uint64,
	delayBetweenCalls time.Duration,
) *ConsensusRetryPolicyDelegator

func (*ConsensusRetryPolicyDelegator) GetEpochLength

func (d *ConsensusRetryPolicyDelegator) GetEpochLength(
	opts *bind.CallOpts,
) (*big.Int, error)

func (*ConsensusRetryPolicyDelegator) RetrieveClaimAcceptanceEvents

func (d *ConsensusRetryPolicyDelegator) RetrieveClaimAcceptanceEvents(
	opts *bind.FilterOpts,
	appAddresses []common.Address,
) ([]*iconsensus.IConsensusClaimAcceptance, error)

type EthClientRetryPolicyDelegator

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

A EthClient Delegator that calls HeaderByNumber with the retry policy defined by util.RetryFunction

func NewEhtClientWithRetryPolicy

func NewEhtClientWithRetryPolicy(
	delegate evmreader.EthClient,
	maxRetries uint64,
	delayBetweenCalls time.Duration,
) *EthClientRetryPolicyDelegator

func (*EthClientRetryPolicyDelegator) HeaderByNumber

func (d *EthClientRetryPolicyDelegator) HeaderByNumber(
	ctx context.Context,
	number *big.Int,
) (*types.Header, error)

type EthWsClientRetryPolicyDelegator

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

func NewEthWsClientWithRetryPolicy

func NewEthWsClientWithRetryPolicy(
	delegate evmreader.EthWsClient,
	maxRetries uint64,
	delayBetweenCalls time.Duration,
) *EthWsClientRetryPolicyDelegator

func (*EthWsClientRetryPolicyDelegator) SubscribeNewHead

func (d *EthWsClientRetryPolicyDelegator) SubscribeNewHead(
	ctx context.Context,
	ch chan<- *types.Header,
) (ethereum.Subscription, error)

type EvmReaderContractFactory

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

Builds contracts delegates that will use retry policy on contract methods calls

func NewEvmReaderContractFactory

func NewEvmReaderContractFactory(
	ethClient *ethclient.Client,
	maxRetries uint64,
	maxDelay time.Duration,

) *EvmReaderContractFactory

func (*EvmReaderContractFactory) NewApplication

func (f *EvmReaderContractFactory) NewApplication(
	address common.Address,
) (evmreader.ApplicationContract, error)

func (*EvmReaderContractFactory) NewIConsensus

func (f *EvmReaderContractFactory) NewIConsensus(
	address common.Address,
) (evmreader.ConsensusContract, error)

type InputSourceWithRetryPolicyDelegator

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

func NewInputSourceWithRetryPolicy

func NewInputSourceWithRetryPolicy(
	delegate evmreader.InputSource,
	maxRetries uint64,
	delay time.Duration,
) *InputSourceWithRetryPolicyDelegator

func (*InputSourceWithRetryPolicyDelegator) RetrieveInputs

func (d *InputSourceWithRetryPolicyDelegator) RetrieveInputs(
	opts *bind.FilterOpts,
	appContract []common.Address,
	index []*big.Int,
) ([]iinputbox.IInputBoxInputAdded, error)

Jump to

Keyboard shortcuts

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