node

package
v0.0.0-...-d578c97 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

func NewNode

func NewNode(key *utils.PrivateKey, logger *log.Logger, config utils.Config) (*Node, error)

func (*Node) AddNode

func (p *Node) AddNode(info utils.NodeInfo)

func (*Node) Close

func (p *Node) Close()

func (*Node) Handle

func (p *Node) Handle(handler func(utils.NodeID, interface{}) interface{})

func (*Node) KnownNodes

func (p *Node) KnownNodes() []utils.NodeInfo

func (*Node) RegisterMessageType

func (p *Node) RegisterMessageType(name string, typ interface{})

func (*Node) Run

func (p *Node) Run()

func (*Node) Send

func (p *Node) Send(dst utils.NodeID, msg interface{}, handler func(interface{})) error

Jump to

Keyboard shortcuts

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