Documentation ¶
Index ¶
- type Config
- type Worker
- func (w *Worker) Cleanup()
- func (w *Worker) Enabled() bool
- func (w *Worker) GetConfig() Config
- func (w *Worker) GetRuntime(id common.Namespace) *committee.Node
- func (w *Worker) GetRuntimes() map[common.Namespace]*committee.Node
- func (w *Worker) Initialized() <-chan struct{}
- func (w *Worker) Name() string
- func (w *Worker) Quit() <-chan struct{}
- func (w *Worker) Start() error
- func (w *Worker) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { SentryAddresses []node.TLSAddress TxPool tpConfig.Config // contains filtered or unexported fields }
Config contains common worker config.
type Worker ¶
type Worker struct { HostNode control.NodeController DataDir string ChainContext string Identity *identity.Identity Consensus consensus.Backend LightClient consensus.LightClient P2P p2p.Service KeyManager keymanagerApi.Backend RuntimeRegistry runtimeRegistry.Registry // contains filtered or unexported fields }
Worker is a garbage bag with lower level services and common runtime objects.
func New ¶
func New( hostNode control.NodeController, dataDir string, chainContext string, identity *identity.Identity, consensus consensus.Backend, lightClient consensus.LightClient, p2p p2p.Service, keyManager keymanagerApi.Backend, runtimeRegistry runtimeRegistry.Registry, ) (*Worker, error)
New creates a new worker.
func (*Worker) Cleanup ¶
func (w *Worker) Cleanup()
Cleanup performs the service specific post-termination cleanup.
func (*Worker) GetRuntime ¶
GetRuntime returns a common committee node for the given runtime (if available).
In case the runtime with the specified id was not configured for this node it returns nil.
func (*Worker) GetRuntimes ¶
GetRuntimes returns a map of configured runtimes.
func (*Worker) Initialized ¶
func (w *Worker) Initialized() <-chan struct{}
Initialized returns a channel that will be closed when the transaction scheduler is initialized and ready to service requests.
Click to show internal directories.
Click to hide internal directories.