Skip to content
RPC server written in Go which communicates with the node via IPC. The RPC JSON format is compatible with the internal RPC server.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Extend timeout as some RPCs are slow, and remove log stmt (#4) Feb 19, 2019
.travis.yml
LICENSE.md rpc-go project Dec 8, 2018
Makefile Add Makefile and update README accordingly (#2) Dec 8, 2018
README.md Add Makefile and update README accordingly (#2) Dec 8, 2018
config.json rpc-go project Dec 8, 2018

README.md

About

rpc-go is an external Nano RPC server written in Go. It receives JSON requests from clients and forwards them to the node via its IPC mechanism. The node currently supports domain sockets and TCP.

Build

Clone the repository and run make

If you want to build with the go tool manually, see Makefile for relevant commands.

Run

Change config.json as needed and run:

bin/rpc-go

Configuration

Sample config.json:

{
	"port": 8080,
	"hostname": "localhost",
	"node": {
		"connection": "local:///tmp/nano",
		"poolsize": 10
	}
}

The port and hostname is where the Web server will listen for RPC POST requests.

The node configuration tells rpc-go where to find the Nano IPC server. The poolsize sets the maximum number of concurrent connections to the node. These are persistent connections to improve performance, but rpc-go will automatically reconnect if needed.

Replace the connection line with something like the following to use TCP instead of domain sockets:

    "connection": "tcp://localhost:7077"

The host and port must match the IPC configuration of the Nano node.

IDE notes for developers

If using Visual Studio Code, setting go.inferGopath to true is recommended. This will add the current workspace path to GOPATH.

A debugger is available via go get -u github.com/derekparker/delve/cmd/dlv

You can’t perform that action at this time.