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) 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 RuntimeClient runtimeClientAPI.RuntimeClient CommonWorker *workerCommon.Worker ExecutorWorker *executor.Worker StorageWorker *workerStorage.Worker SentryWorker *workerSentry.Worker P2P *p2p.P2P RegistrationWorker *registration.Worker KeymanagerWorker *workerKeymanager.Worker ConsensusWorker *workerConsensusRPC.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.
func NewTestNode ¶
NewTestNode initializes and launches the (test) Oasis node service.
The test node uses a test genesis block and should only be used in unit tests.
func (*Node) GetIdentity ¶
Implements control.ControlledNode.
func (*Node) 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)
Implements control.ControlledNode.
func (*Node) RegistrationStopped ¶
func (n *Node) RegistrationStopped()
Implements registration.Delegate.
func (*Node) RequestShutdown ¶
Implements control.ControlledNode.