Websocket client for Centrifuge library and Centrifugo server.
Documentation
There is no v1 release of this library yet, API is not stable – so use with tools like dep
or go mod
.
Feature matrix
- connect to server using JSON protocol format
- connect to server using Protobuf protocol format
- connect with JWT
- connect with custom header
- automatic reconnect in case of errors, network problems etc
- exponential backoff for reconnect
- connect and disconnect events
- handle disconnect reason
- subscribe on channel and handle asynchronous Publications
- handle Join and Leave messages
- handle Unsubscribe notifications
- reconnect on subscribe timeout
- publish method of Subscription
- unsubscribe method of Subscription
- presence method of Subscription
- presence stats method of Subscription
- history method of Subscription
- send asynchronous messages to server
- handle asynchronous messages from server
- send RPC commands
- publish to channel without being subscribed
- subscribe to private channels with JWT
- connection JWT refresh
- private channel subscription JWT refresh
- handle connection expired error
- handle subscription expired error
- ping/pong to find broken connection
- server-side subscriptions
- message recovery mechanism
License
MIT