bruce2008github / relayR

Simple real-time web for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RelayR

RelayR is a Go package that provides easy-to-use real time communication APIs for Go web applications.

Installation

IMPORTANT:

RelayR relies on the Gorilla WebSocket package for WebSocket support. Please head over to that repository, give it a star, and ``go getit into yourGOPATH`.

Also important: RelayR currently only supports WebSockets. Server Sent Events and Long Polling options are on the roadmap.

Installing RelayR

After you have installed the Gorilla WebSocket package, you can run the following:

go get -u https://github.com/simon-whitehead/relayR

Examples

The /examples directory contains three examples.

The first one is a simple Server -> Client timestamp push. The server will push the current time down to all connected clients every second.

It looks like this:

relayr-time-push

The second one is a replica of the famous SignalR sample, "High-Frequency Realtime with SignalR" where a shape can be dragged around a browser and broadcast to all clients.

It looks like this:

relayr-shape-move

The third one demonstrates Groups and membership. It allows clients to subscribe to groups and receive notifications that are pushed to groups they are subscribed to.

Project status

This is very much a work in progress - some might say, pre-alpha. The code is horrible .. but it works. I am opening it up to the world early for feedback and contributions (in any form).

Contributing

Please! Fork away .. improve it .. create a PR .. whatever you want to do. I am open to any and all help.

Licence

This code is released under the Apache 2.0 licence.

About

Simple real-time web for Go

License:Apache License 2.0


Languages

Language:Go 85.4%Language:HTML 14.6%