dispatcher

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: 3 Imported by: 0

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 {
	lifecycle.StartStopper

	// 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.

Jump to

Keyboard shortcuts

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