Provides the following functionality for Google Cloud Messaging:
- Sending messages via HTTP or XMPP.
- Receiving messages from XMPP.
Documentation: see godoc
$ go get github.com/topfreegames/go-gcm
This is a rework of go-gcm library. It has the following improvements:
- code refactored, HTTP and XMPP clients separated
- monitors XMPP connection with pings, redials when ping fails
- handles CONNECTION_DRAINING properly
- graceful close
- exponential backoff when sending a message
- circuit breaker for each provider
- improved logging with logrus
- ginkgo tests
- various govet/golint fixes
- automatic builds with Travis and coverage with Codecov
This library is in Beta. We will make an effort to support the library, but we reserve the right to make incompatible changes when necessary.
Please read CONTRIBUTING and raise issues here in Github.
Note that GCM limitations are not enforced by the library. Instead, all valid requests are sent to the server and a corresponding error is returned (Message Too Big, Device Message Rate Exceeded, etc).