Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnknownMessageType = iota PrePrepareMessageType PrepareMessageType CommitMessageType NewTxMessageType NewBlockMessageType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler func(message *PubSubMessage)
type PubSubMessage ¶
type PubSubMessage struct { Type PubSubMessageType From peer.ID `cbor:"-"` Payload []byte }
type PubSubMessageType ¶
type PubSubMessageType int
type PubSubRouter ¶
func NewPubSubRouter ¶
func (*PubSubRouter) BroadcastToServiceTopic ¶
func (psr *PubSubRouter) BroadcastToServiceTopic(msg *PubSubMessage) error
func (*PubSubRouter) Hook ¶
func (psr *PubSubRouter) Hook(messageType PubSubMessageType, handler Handler)
func (*PubSubRouter) Run ¶
func (psr *PubSubRouter) Run()
func (*PubSubRouter) Shutdown ¶
func (psr *PubSubRouter) Shutdown()
Click to show internal directories.
Click to hide internal directories.