Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description


Gossip Over Gophers

![GoDoc] (

[Writeup] (

###How to build:

$ go build

Show usage:

$ ./gog -h

Run a standalone node:

$ ./gog

To join an existing cluster:

  1. Form a two-node-cluster

     $ ./gog -addr="localhost:8000" -rest-addr="localhost:8001"
     $ ./gog -addr="localhost:8002" -rest-addr="localhost:8003"
  2. Let the first node join the second node

     $ curl http://localhost:8001/api/join -d peer=localhost:8002
  3. Show the view in the first node

     $ curl http://localhost:8001/api/list

You can also provide a json file contains a list of nodes:

$ cat peers.json
["localhost:8000", "localhost:8001", "localhost:8002", "localhost:8003"]

$ curl -d @peers.json -H "Content-Type: application/json" http://localhost:8001/api/join

To broadcast a message:

$ curl http://localhost:8001/api/broadcast -d message=hello
Docker Pull Command
Source Repository