common

package
v0.4.2-dev Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Log keys
	PrimarySyncProgressKey  string = "primarySyncProgress"
	FallbackSyncProgressKey string = "fallbackSyncProgress"
	SyncProgressKey         string = "syncProgress"
	PrimaryErrorKey         string = "primaryError"
	FallbackErrorKey        string = "fallbackError"

	EthClientSyncTimeout    int64 = 8 // 8 seconds
	BeaconClientSyncTimeout int64 = 8 // 8 seconds

)

Settings

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceProvider

type ServiceProvider struct {
	*services.ServiceProvider
	// contains filtered or unexported fields
}

A container for all of the various services used by Hyperdrive

func NewServiceProvider

func NewServiceProvider(userDir string) (*ServiceProvider, error)

Creates a new ServiceProvider instance

func (*ServiceProvider) GetConfig

func (p *ServiceProvider) GetConfig() *hdconfig.HyperdriveConfig

func (*ServiceProvider) GetUserDir

func (p *ServiceProvider) GetUserDir() string

func (*ServiceProvider) RequireBeaconClientSynced

func (sp *ServiceProvider) RequireBeaconClientSynced(ctx context.Context) error

func (*ServiceProvider) RequireEthClientSynced

func (sp *ServiceProvider) RequireEthClientSynced(ctx context.Context) error

func (*ServiceProvider) RequireNodeAddress

func (sp *ServiceProvider) RequireNodeAddress() error

func (*ServiceProvider) RequireWalletReady

func (sp *ServiceProvider) RequireWalletReady() error

func (*ServiceProvider) WaitBeaconClientSynced

func (sp *ServiceProvider) WaitBeaconClientSynced(ctx context.Context, verbose bool) error

Wait for the Beacon client to sync; timeout of 0 indicates no timeout

func (*ServiceProvider) WaitEthClientSynced

func (sp *ServiceProvider) WaitEthClientSynced(ctx context.Context, verbose bool) error

Wait for the Executon client to sync; timeout of 0 indicates no timeout

Jump to

Keyboard shortcuts

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