driver

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*rpc.ClientConfig
	P2PSync            bool
	P2PSyncTimeout     time.Duration
	RetryInterval      time.Duration
	MaxExponent        uint64
	BlobServerEndpoint *url.URL
	SocialScanEndpoint *url.URL
}

Config contains the configurations to initialize a Taiko 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 {
	*Config
	// contains filtered or unexported fields
}

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

func (*Driver) ChainSyncer

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

ChainSyncer returns the driver's chain syncer, this method should only be used for testing.

func (*Driver) Close

func (d *Driver) Close(_ context.Context)

Close closes the driver instance.

func (*Driver) InitFromCli

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

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

func (*Driver) InitFromConfig

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

InitFromConfig initializes the driver instance based on the given configurations.

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.

Jump to

Keyboard shortcuts

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