dispatch

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 14 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) EventAudit

func (d *IotxDispatcher) EventAudit() map[uint32]int

EventAudit returns the event audit map

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(ctx context.Context) error

Start starts the dispatcher.

func (*IotxDispatcher) Stop

func (d *IotxDispatcher) Stop(ctx context.Context) 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