Documentation ¶
Index ¶
- func NewDispatcher(cfg *config.Config, bc blockchain.Blockchain, ap actpool.ActPool, ...) (dispatcher.Dispatcher, error)
- type IotxDispatcher
- func (d *IotxDispatcher) Consensus() consensus.Consensus
- func (d *IotxDispatcher) EventChan() *chan interface{}
- func (d *IotxDispatcher) HandleBroadcast(message proto.Message, done chan bool)
- func (d *IotxDispatcher) HandleTell(sender net.Addr, message proto.Message, done chan bool)
- func (d *IotxDispatcher) Start() error
- func (d *IotxDispatcher) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶
func NewDispatcher( cfg *config.Config, bc blockchain.Blockchain, ap actpool.ActPool, bs blocksync.BlockSync, dp delegate.Pool, sf state.Factory, ) (dispatcher.Dispatcher, error)
NewDispatcher creates a new Dispatcher
Types ¶
type IotxDispatcher ¶
type IotxDispatcher struct {
// contains filtered or unexported fields
}
IotxDispatcher is the request and event dispatcher for iotx node.
func (*IotxDispatcher) Consensus ¶
func (d *IotxDispatcher) Consensus() consensus.Consensus
Consensus returns the consensus instance
func (*IotxDispatcher) EventChan ¶
func (d *IotxDispatcher) EventChan() *chan interface{}
EventChan returns the event chan
func (*IotxDispatcher) HandleBroadcast ¶
func (d *IotxDispatcher) HandleBroadcast(message proto.Message, done chan bool)
HandleBroadcast handles incoming broadcast message
func (*IotxDispatcher) HandleTell ¶
HandleTell handles incoming unicast message
func (*IotxDispatcher) Stop ¶
func (d *IotxDispatcher) Stop() error
Stop gracefully shuts down the dispatcher by stopping all handlers and waiting for them to finish.
Directories ¶
Path | Synopsis |
---|---|
Package dispatcher defines Dispatcher interface which is used to dispatching incoming request and event.
|
Package dispatcher defines Dispatcher interface which is used to dispatching incoming request and event. |
Click to show internal directories.
Click to hide internal directories.