services

package
v2.0.0-b2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: GPL-3.0 Imports: 24 Imported by: 19

Documentation

Index

Constants

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

	EthClientSyncTimeout    time.Duration = 8 * time.Second
	BeaconClientSyncTimeout time.Duration = 8 * time.Second
)

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 the Smartnode

func CreateServiceProviderFromComponents

func CreateServiceProviderFromComponents(cfg *config.SmartNodeConfig, sp *services.ServiceProvider) (*ServiceProvider, error)

Creates a ServiceProvider instance from a core service provider and Smart Node config

func NewServiceProvider

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

Creates a new ServiceProvider instance

func (*ServiceProvider) Close

func (p *ServiceProvider) Close()

func (*ServiceProvider) GetConfig

func (p *ServiceProvider) GetConfig() *config.SmartNodeConfig

func (*ServiceProvider) GetRocketPool

func (p *ServiceProvider) GetRocketPool() *rocketpool.RocketPool

func (*ServiceProvider) GetServiceProvider

func (p *ServiceProvider) GetServiceProvider() *services.ServiceProvider

func (*ServiceProvider) GetSnapshotDelegation

func (p *ServiceProvider) GetSnapshotDelegation() *contracts.SnapshotDelegation

func (*ServiceProvider) GetUserDir

func (p *ServiceProvider) GetUserDir() string

func (*ServiceProvider) GetValidatorManager

func (p *ServiceProvider) GetValidatorManager() *validator.ValidatorManager

func (*ServiceProvider) GetWatchtowerLogger

func (p *ServiceProvider) GetWatchtowerLogger() *log.Logger

func (*ServiceProvider) RefreshRocketPoolContracts

func (p *ServiceProvider) RefreshRocketPoolContracts() error

Refresh the Rocket Pool contracts if they've been updated since they were last loaded

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) RequireNodeRegistered

func (sp *ServiceProvider) RequireNodeRegistered(ctx context.Context) (types.ResponseStatus, error)

func (*ServiceProvider) RequireOnOracleDao

func (sp *ServiceProvider) RequireOnOracleDao(ctx context.Context) (types.ResponseStatus, error)

func (*ServiceProvider) RequireOnSecurityCouncil

func (sp *ServiceProvider) RequireOnSecurityCouncil(ctx context.Context) (types.ResponseStatus, error)

func (*ServiceProvider) RequireRocketPoolContracts

func (sp *ServiceProvider) RequireRocketPoolContracts(ctx context.Context) (types.ResponseStatus, error)

func (*ServiceProvider) RequireSnapshot

func (sp *ServiceProvider) RequireSnapshot() 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) WaitNodeAddress

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

func (*ServiceProvider) WaitNodeRegistered

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

Wait until the node has been registered with the Rocket Pool network

func (*ServiceProvider) WaitWalletReady

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

Jump to

Keyboard shortcuts

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