Documentation ¶
Index ¶
- Variables
- 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 ¶
View Source
var ( // CfgClientPort configures the worker client port. CfgClientPort = "worker.client.port" // CfgSentryAddresses configures addresses and public keys of sentry nodes the worker should // connect to. CfgSentryAddresses = "worker.sentry.address" // Flags has the configuration flags. Flags = flag.NewFlagSet("", flag.ContinueOnError) )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClientPort uint16 ClientAddresses []node.Address SentryAddresses []node.TLSAddress TxPool txpool.Config // contains filtered or unexported fields }
Config contains common worker config.
type Worker ¶
type Worker struct { HostNode control.ControlledNode DataDir string Identity *identity.Identity Consensus consensus.Backend Grpc *grpc.Server GrpcPolicyWatcher policyAPI.PolicyWatcher P2P p2p.Service IAS ias.Endpoint KeyManager keymanagerApi.Backend RuntimeRegistry runtimeRegistry.Registry GenesisDoc *genesis.Document // contains filtered or unexported fields }
Worker is a garbage bag with lower level services and common runtime objects.
func New ¶
func New( hostNode control.ControlledNode, dataDir string, identity *identity.Identity, consensus consensus.Backend, p2p p2p.Service, ias ias.Endpoint, keyManager keymanagerApi.Backend, runtimeRegistry runtimeRegistry.Registry, genesisDoc *genesis.Document, ) (*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.
Directories ¶
Path | Synopsis |
---|---|
Package p2p implements the worker committee gossip network.
|
Package p2p implements the worker committee gossip network. |
api
Package api implements the P2P API.
|
Package api implements the P2P API. |
error
Package error exists only to break an import loop.
|
Package error exists only to break an import loop. |
rpc
Package rpc provides tools for building simple RPC protocols via libp2p.
|
Package rpc provides tools for building simple RPC protocols via libp2p. |
Click to show internal directories.
Click to hide internal directories.