Documentation
¶
Overview ¶
Package dispatcher defines Dispatcher interface which is used to dispatching incoming request and event. The main reason to pick this as an independent package is to resolve cyclic dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher interface {
// Start starts a dispatcher
Start() error
// Stop stops a dispatcher
Stop() error
// HandleBroadcast handles the incoming broadcast message. The transportation layer semantics is at least once.
// That said, the handler is likely to receive duplicate messages.
HandleBroadcast(proto.Message, chan bool)
// HandleTell handles the incoming tell message. The transportation layer semantics is exact once. The sender is
// given for the sake of replying the message
HandleTell(net.Addr, proto.Message, chan bool)
}
Dispatcher is used by peers, handles incoming block and header notifications and relays announcements of new blocks.
Click to show internal directories.
Click to hide internal directories.