chain

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToNumberedEpoch

func ConvertToNumberedEpoch(cfx sdk.ClientOperator, epoch *types.Epoch) (*types.Epoch, error)

ConvertToNumberedEpoch converts named epoch to numbered epoch if necessary.

func MustNewCfxClientFromViper

func MustNewCfxClientFromViper(isWebSocket ...bool) *sdk.Client

MustNewCfxClientFromViper creates an instance of Conflux client from viper or panic on error.

func NewCfxClientWithOptionFromViper

func NewCfxClientWithOptionFromViper(endpoint string) (*sdk.Client, error)

NewCfxClientWithOptionFromViper creates an instance of Conflux client with option provided from viper.

Types

type CfxClientOptionConfig

type CfxClientOptionConfig struct {
	// retry counts if request failed
	Retry int `default:"3"`
	// retry interval if request failed
	RetryInterval time.Duration `default:"1s"`
	// request timeout
	RequestTimeout time.Duration `default:"3s"`
}

CfxClientOptionConfig Conflux SDK client option configurations.

Jump to

Keyboard shortcuts

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