driver

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Time to wait before the next try, when receiving subscription errors.
	RetryDelay = 10 * time.Second
)

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, d *Driver, cfg *Config) (err error)

InitFromConfig initializes the driver instance based on the given configurations.

Types

type Config

type Config struct {
	L1Endpoint            string
	L2Endpoint            string
	L2EngineEndpoint      string
	L2CheckPoint          string
	MxcL1Address          common.Address
	MxcL2Address          common.Address
	JwtSecret             string
	P2PSyncVerifiedBlocks bool
	P2PSyncTimeout        time.Duration
}

Config contains the configurations to initialize a Mxc driver.

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from the command line inputs.

type Driver

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

Driver keeps the L2 execution engine's local block chain in sync with the MxcL1 contract.

func (*Driver) ChainSyncer

func (d *Driver) ChainSyncer() *chainSyncer.L2ChainSyncer

ChainSyncer returns the driver's chain syncer.

func (*Driver) Close

func (d *Driver) Close()

Close closes the driver instance.

func (*Driver) InitFromCli

func (d *Driver) InitFromCli(ctx context.Context, c *cli.Context) error

New initializes the given driver instance based on the command line flags.

func (*Driver) Name

func (d *Driver) Name() string

Name returns the application name.

func (*Driver) Start

func (d *Driver) Start() error

Start starts the driver instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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