dispatch

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDispatcher

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

func (d *IotxDispatcher) HandleTell(sender net.Addr, message proto.Message, done chan bool)

HandleTell handles incoming unicast message

func (*IotxDispatcher) Start

func (d *IotxDispatcher) Start() error

Start starts the dispatcher.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL