Documentation ¶
Index ¶
- Constants
- type ServiceProvider
- func (p *ServiceProvider) Close()
- func (p *ServiceProvider) GetConfig() *config.SmartNodeConfig
- func (p *ServiceProvider) GetRocketPool() *rocketpool.RocketPool
- func (p *ServiceProvider) GetServiceProvider() *services.ServiceProvider
- func (p *ServiceProvider) GetSnapshotDelegation() *contracts.SnapshotDelegation
- func (p *ServiceProvider) GetUserDir() string
- func (p *ServiceProvider) GetValidatorManager() *validator.ValidatorManager
- func (p *ServiceProvider) GetWatchtowerLogger() *log.Logger
- func (p *ServiceProvider) RefreshRocketPoolContracts() error
- func (sp *ServiceProvider) RequireBeaconClientSynced(ctx context.Context) error
- func (sp *ServiceProvider) RequireEthClientSynced(ctx context.Context) error
- func (sp *ServiceProvider) RequireNodeAddress() error
- func (sp *ServiceProvider) RequireNodeRegistered(ctx context.Context) (types.ResponseStatus, error)
- func (sp *ServiceProvider) RequireOnOracleDao(ctx context.Context) (types.ResponseStatus, error)
- func (sp *ServiceProvider) RequireOnSecurityCouncil(ctx context.Context) (types.ResponseStatus, error)
- func (sp *ServiceProvider) RequireRocketPoolContracts(ctx context.Context) (types.ResponseStatus, error)
- func (sp *ServiceProvider) RequireSnapshot() error
- func (sp *ServiceProvider) RequireWalletReady() error
- func (sp *ServiceProvider) WaitBeaconClientSynced(ctx context.Context, verbose bool) error
- func (sp *ServiceProvider) WaitEthClientSynced(ctx context.Context, verbose bool) error
- func (sp *ServiceProvider) WaitNodeAddress(ctx context.Context, verbose bool) error
- func (sp *ServiceProvider) WaitNodeRegistered(ctx context.Context, verbose bool) error
- func (sp *ServiceProvider) WaitWalletReady(ctx context.Context, verbose bool) error
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
Click to show internal directories.
Click to hide internal directories.