dapr

package module
v0.0.0-...-4071b33 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2018 License: BSD-3-Clause Imports: 1 Imported by: 0

README

dapr

CircleCI

Go implementation of a Dash node.

Note: this is currently in development, and should not be run in production.

Installation

Clone the repository locally.

git clone git@github.com:dapr-project/dapr.git

Download the latest GeoLite2 City database.

curl http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz -O
tar zxvf GeoLite2-City.tar.gz
mkdir dapr/data
cp GeoLite2-City_*/GeoLite2-City.mmdb dapr/data/

Change into the DAPR repository, and build the binary.

cd dapr
make

Usage

Run the binary, with default arguments. This will use the ./data directory, and connect to 8 peers.

./dist/dapr

You will see some output with information about the startup and connected peers.

[dapr] 2018/10/04 22:42:50 main: starting...
[dapr] 2018/10/04 22:42:50 geo: initialising...
[dapr] 2018/10/04 22:42:50 peer-stats: initialising...
[dapr] 2018/10/04 22:42:50 peer-store: initialising...
[dapr] 2018/10/04 22:42:50 peer-store: loaded 79 peer details from disk
[dapr] 2018/10/04 22:42:50 peer-discovery: initialising...
[dapr] 2018/10/04 22:42:51 peer-discovery: resolved dnsseed.dash.org to 26 addresses
[dapr] 2018/10/04 22:42:51 peer-manager: initialising...
[dapr] 2018/10/04 22:42:51 peer: socket connected (95.85.19.44:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Amsterdam country=Netherlands code=NL location=52.296500,4.954200 (95.85.19.44:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (176.9.78.10:9999)
[dapr] 2018/10/04 22:42:51 peer: city= country=Germany code=DE location=51.299300,9.491000 (176.9.78.10:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (52.200.199.198:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Ashburn country=United States code=US location=39.048100,-77.472800 (52.200.199.198:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (34.234.253.31:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Ashburn country=United States code=US location=39.048100,-77.472800 (34.234.253.31:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (38.111.114.144:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Toronto country=Canada code=CA location=43.623000,-79.393600 (38.111.114.144:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (45.76.21.109:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Elk Grove Village country=United States code=US location=42.015200,-87.990100 (45.76.21.109:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (45.76.75.21:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Los Angeles country=United States code=US location=34.072900,-118.260600 (45.76.75.21:9999)
[dapr] 2018/10/04 22:42:51 peer: socket connected (45.32.74.201:9999)
[dapr] 2018/10/04 22:42:51 peer: city=Los Angeles country=United States code=US location=34.072900,-118.260600 (45.32.74.201:9999)
[dapr] 2018/10/04 22:42:51 peer-manager: ensure finished, connected to 8 peers
[dapr] 2018/10/04 22:42:51 web: starting...

To connect to a different amount of peers, you can use the --max-peers flag, to specify up to a maximum of 50 peers.

To see other available flags run ./dist/dapr with the --help flag.

Documentation

Index

Constants

View Source
const (
	TestModeOff testMode = iota
	TestModeSuccess
	TestModeFailure
	TestModeTimeNow
)

TestModes control how peer connect behaves under test.

Variables

View Source
var Commit string

Commit is the latest git short commit hash.

View Source
var TestMode = TestModeOff

TestMode determines whether the project is running under test.

View Source
var Version string

Version is the current git tag of dapr.

Functions

func IsTestingFailurePath

func IsTestingFailurePath() bool

IsTestingFailurePath returns true if we're stubbing a failing code path.

func IsTestingModeOff

func IsTestingModeOff() bool

IsTestingModeOff returns true if we're not testing.

func IsTestingSuccessPath

func IsTestingSuccessPath() bool

IsTestingSuccessPath returns true if we're stubbing a successful code path.

func IsTestingTime

func IsTestingTime() bool

IsTestingTime returns true if we're stubbing time.Now().

func UserAgent

func UserAgent() string

UserAgent returns the user agent string for the current version.

Types

This section is empty.

Directories

Path Synopsis
cmd
Package config stores all possible runtime configuration settings.
Package config stores all possible runtime configuration settings.
Package logger implements logging functions for simple and verbose logging, with a context.
Package logger implements logging functions for simple and verbose logging, with a context.
Package peer implements functions and types for representing peers on the Dash network.
Package peer implements functions and types for representing peers on the Dash network.
peerdiscovery
Package peerdiscovery is respsonsible for bootstrapping the peerstore with reachable nodes on the Dash network.
Package peerdiscovery is respsonsible for bootstrapping the peerstore with reachable nodes on the Dash network.
peermanager
Package peermanager is respsonsible for maintaining a required minimum number of connections to peers on the Dash network.
Package peermanager is respsonsible for maintaining a required minimum number of connections to peers on the Dash network.
peerstats
Package peerstats implements functions and types for tracking peer stats.
Package peerstats implements functions and types for tracking peer stats.
peerstore
Package peerstore is respsonsible for storing reachable peers on the Dash network.
Package peerstore is respsonsible for storing reachable peers on the Dash network.
peersystem
Package peersystem is respsonsible for initialising the peer subsystem in the correct order.
Package peersystem is respsonsible for initialising the peer subsystem in the correct order.
web

Jump to

Keyboard shortcuts

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