Documentation ¶
Overview ¶
Package node implements the Oasis node.
Index ¶
- Constants
- Variables
- func Register(parentCmd *cobra.Command)
- func Run(cmd *cobra.Command, args []string)
- type Node
- func (n *Node) Cleanup()
- func (n *Node) GetIdentity() *identity.Identity
- func (n *Node) GetKeymanagerStatus(ctx context.Context) (*keymanagerWorker.Status, error)
- func (n *Node) GetPendingUpgrades(ctx context.Context) ([]*upgrade.PendingUpgrade, error)
- func (n *Node) GetRegistrationStatus(ctx context.Context) (*control.RegistrationStatus, error)
- func (n *Node) GetRuntimeStatus(ctx context.Context) (map[common.Namespace]control.RuntimeStatus, error)
- func (n *Node) Ready() <-chan struct{}
- func (n *Node) RegistrationStopped()
- func (n *Node) RequestShutdown() (<-chan struct{}, error)
- func (n *Node) Stop()
- func (n *Node) Wait()
Constants ¶
const ( // CfgPreserveLocalStorage exempts the untrusted local storage from // the unsafe-reset sub-command. CfgPreserveLocalStorage = "preserve.local_storage" // CfgPreserveMKVSDatabase exempts the MKVS database from the unsafe-reset // sub-command. CfgPreserveMKVSDatabase = "preserve.mkvs_database" )
Variables ¶
var Flags = flag.NewFlagSet("", flag.ContinueOnError)
Flags has the configuration flags.
Functions ¶
Types ¶
type Node ¶
type Node struct { NodeController controlAPI.NodeController DebugController controlAPI.DebugController Consensus consensusAPI.Backend Upgrader upgradeAPI.Backend Genesis genesisAPI.Provider Identity *identity.Identity Sentry sentryAPI.LocalBackend IAS iasAPI.Endpoint RuntimeRegistry runtimeRegistry.Registry CommonWorker *workerCommon.Worker ExecutorWorker *executor.Worker StorageWorker *workerStorage.Worker ClientWorker *workerClient.Worker SentryWorker *workerSentry.Worker P2P p2pAPI.Service RegistrationWorker *registration.Worker KeymanagerWorker *workerKeymanager.Worker ConsensusWorker *workerConsensusRPC.Worker BeaconWorker *workerBeacon.Worker // contains filtered or unexported fields }
Node is the Oasis node service.
WARNING: This is exposed for the benefit of tests and the interface is not guaranteed to be stable.
func NewNode ¶
NewNode initializes and launches the Oasis node service.
WARNING: This will misbehave iff cmd != RootCommand(). This is exposed for the benefit of tests and the interface is not guaranteed to be stable.
Note: the reason for having the named err return value here is for the deferred func below to propagate the error.
func (*Node) GetIdentity ¶
GetIdentity implements control.ControlledNode.
func (*Node) GetKeymanagerStatus ¶ added in v0.2202.0
GetKeymanagerStatus implements control.ControlledNode.
func (*Node) GetPendingUpgrades ¶ added in v0.2100.0
GetPendingUpgrades implements control.ControlledNode.
func (*Node) GetRegistrationStatus ¶
GetRegistrationStatus implements control.ControlledNode.
func (*Node) GetRuntimeStatus ¶ added in v0.2010.0
func (n *Node) GetRuntimeStatus(ctx context.Context) (map[common.Namespace]control.RuntimeStatus, error)
GetRuntimeStatus implements control.ControlledNode.
func (*Node) Ready ¶
func (n *Node) Ready() <-chan struct{}
Ready implements control.ControlledNode.
func (*Node) RegistrationStopped ¶
func (n *Node) RegistrationStopped()
RegistrationStopped implements registration.Delegate.
func (*Node) RequestShutdown ¶
RequestShutdown implements control.ControlledNode.