p2p-gossip

command module
v0.0.0-...-178a051 Latest Latest
Warning

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

Go to latest
Published: May 5, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

README

wercker status GoDoc

p2p-gossip

A p2p gossip protocol for requesting artifacts.

Building

From the top-level directory:
go get -v
go build main.go

Running

Run the peer by passing in the -p argument to the binary. This will run the peer in the foreground.

For example, ./gossip -p --verbose

Instantiate the binary subsequent times to receive resources with the get argument.

For example, ./gossip get cats.jpg

Running Tests

Running the unit tests doesn't require any setup. go test ./...

Package Descriptions

ID

The ID package provides functionality for generating unique, random IDs. IDs consist of a simple byte slice, and a size.
To use the ID package, I recommend making a 'master' ID running new(PeerID), and then calling the ServeIDs function on that ID pointer. The ServeIDs function will feed new IDs through a channel (thread safe queue primitive for inter-process communication).

TTL

The TTL package implements a time-to-live structure. This is a simple wrapper around an integer that represents a time-to-live for a packet.

UDP

The UDP package provides the functionality to communicate between peers in the peer network.

Packet

The Packet package transforms the types that need to be sent in a packet to a single buffer.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package id provides an interface that defines a random N-byte id generator, and an implementation of the ID interface.
Package id provides an interface that defines a random N-byte id generator, and an implementation of the ID interface.
Package library is a package that keeps track of resources available to a user.
Package library is a package that keeps track of resources available to a user.
Package packet provides tools to turn data into a buffer which can be sent through a packet.
Package packet provides tools to turn data into a buffer which can be sent through a packet.
Package server serves up REST urls for User Interfaces to the Peer.
Package server serves up REST urls for User Interfaces to the Peer.
Package ttl provides a TTL interface that defines a time-to-live that can be packetized.
Package ttl provides a TTL interface that defines a time-to-live that can be packetized.
udp
Package udp provides a peer that can send and receive udp packets.
Package udp provides a peer that can send and receive udp packets.
peer
Package peer implements the udp Peer interface.
Package peer implements the udp Peer interface.
receiver
Package receiver implements the udp Receiver interface.
Package receiver implements the udp Receiver interface.

Jump to

Keyboard shortcuts

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