decision

package
v0.0.0-...-2963f48 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

func NewEngine

func NewEngine(ctx context.Context, bs bstore.Blockstore) *Engine

func (*Engine) MessageReceived

func (e *Engine) MessageReceived(p peer.ID, m bsmsg.BitSwapMessage) error

MessageReceived performs book-keeping. Returns error if passed invalid arguments.

func (*Engine) MessageSent

func (e *Engine) MessageSent(p peer.ID, m bsmsg.BitSwapMessage) error

func (*Engine) Outbox

func (e *Engine) Outbox() <-chan Envelope

func (*Engine) Peers

func (e *Engine) Peers() []peer.ID

Returns a slice of Peers with whom the local node has active sessions

type Envelope

type Envelope struct {
	// Peer is the intended recipient
	Peer peer.ID
	// Message is the payload
	Message bsmsg.BitSwapMessage
}

Envelope contains a message for a Peer

Jump to

Keyboard shortcuts

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