Golang port of Zyre
Go Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
beacon Merge pull request #46 from stephan57160/master Jul 8, 2018
cmd/monitor There is no reason why not bind and connect at the same time Mar 31, 2015
examples Let's keep the original chat example as simple as possible Apr 2, 2015
misc bins-linux-x86_64 is much more sensible name for binary dist archive Apr 2, 2015
shm Refactor shm package and fix race conditions Apr 19, 2016
zre/msg Regenerated the codec Mar 30, 2015
.gitignore Unfortunately can't use url had to commit binary release.tar.gz Apr 2, 2015
.travis.yml Skip header sync tests when in travisci Jul 8, 2018
Dockerfile bins-linux-x86_64 is much more sensible name for binary dist archive Apr 2, 2015
INSTALL.md Update the version of zeromq and enable verbosity in the tests Feb 18, 2016
LICENSE
Makefile
README.md Unfortunately can't use url had to commit binary release.tar.gz Apr 2, 2015
README.tests Updated gyre to work with latest version of go Feb 17, 2016
README.zre_msg Migrated to ZRE 2.0-draft Jun 11, 2014
event.go
group.go Immigrated to zproto_codec_go Jul 1, 2014
group_test.go Now imports are organized, std lib packages are in the first group Jul 31, 2014
gyre.go Problem: Gyre API dosn't let the caller application decide about errs Apr 23, 2015
gyre_test.go Skip header sync tests when in travisci Jul 8, 2018
license.xml Immigrated to zproto_codec_go Jul 1, 2014
node.go Fix. Set correct peer status on HELLO Apr 19, 2016
peer.go Problem: We rarly want to change ping interval at runtime Apr 21, 2015
peer_test.go Now imports are organized, std lib packages are in the first group Jul 31, 2014
zre_msg.bnf
zre_msg.xml Signature should be 1 not 0 Mar 26, 2015

README.md

Gyre GoDoc Build Status

This is a Golang port of Zyre 2.0, an open-source framework for proximity-based peer-to-peer applications, implementing the same ZeroMQ Realtime Exchange Protocol.

Description

Gyre does local area discovery and clustering. A Gyre node broadcasts UDP beacons, and connects to peers that it finds. This class wraps a Gyre node with a message-based API.

All incoming events are delivered via the recv call of a Gyre instance. The first frame defines the type of the message, and following frames provide further values:

ENTER fromnode headers ipaddress
    a new peer has entered the network
EXIT fromnode
    a peer has left the network
JOIN fromnode groupname
    a peer has joined a specific group
LEAVE fromnode groupname
    a peer has left a specific group
WHISPER fromnode message
    a peer has sent this node a message
SHOUT fromnode groupname message
    a peer has sent one of our groups a message

In SHOUT and WHISPER the message is a single frame in this version. In ENTER, the headers frame contains a packed dictionary.

To join or leave a group, use the Join and Leave methods. To set a header value, use the SetHeader method. To send a message to a single peer, use Whisper method. To send a message to a group, use Shout.

Example (docker)

Run following command in a terminal:

docker run --rm -i --tty -t armen/gyre chat -name yourname

And repeat the above command in another terminal, the chat instances will discover eachother. Happy chatting!

Api

View the API docs GoDoc

Project Organization

Gyre is owned by all its authors and contributors. This is an open source project licensed under the LGPLv3. To contribute to Gyre please read the C4.1 process that we use.

To report an issue, use the Gyre issue tracker at github.com.