router

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Router

type Router struct {
	// contains filtered or unexported fields
}

Router forwards messages from their source to their destination

func NewRouter

func NewRouter(log log.Logger) *Router

func (*Router) Listen

func (r *Router) Listen(id msg.ChainId, w chains.Writer)

Listen registers a Writer with a ChainId which Router.Send can then use to propagate messages

func (*Router) Send

func (r *Router) Send(msg msg.Message) error

Send passes a message to the destination Writer if it exists

Jump to

Keyboard shortcuts

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