common

package
v0.5.0-b1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: AGPL-3.0 Imports: 14 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"
)

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 by loading the Hyperdrive config in the provided directory

func NewServiceProviderFromConfig

func NewServiceProviderFromConfig(cfg *hdconfig.HyperdriveConfig) (*ServiceProvider, error)

Creates a new ServiceProvider instance directly from a Hyperdrive config instead of loading it from the filesystem

func NewServiceProviderFromCustomServices

func NewServiceProviderFromCustomServices(cfg *hdconfig.HyperdriveConfig, resources *config.NetworkResources, ecManager *services.ExecutionClientManager, bnManager *services.BeaconClientManager, docker client.APIClient) (*ServiceProvider, error)

Creates a new ServiceProvider instance from custom services and artifacts

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

func (*ServiceProvider) WaitForWallet

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

Wait for the wallet to be ready

Jump to

Keyboard shortcuts

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