Commit Graph

818 Commits

Author SHA1 Message Date
Sebastien Melki 3556bfd575
Fix image fcm (#454)
* allow sending data ONLY notifications for FCM notifications

* fix tests to pass

* support image parameter used for FCM

* remove unused import

* read apns payload on fcm notifications

* update go-fcm to 0.1.5
2020-02-07 11:39:44 +08:00
Bo-Yi Wu c379630c29
chore(graceful): support custom timeout value (#466)
fixed: https://github.com/appleboy/gorush/issues/465
2020-02-05 23:23:16 +08:00
Bo-Yi Wu eba8c2d4a6
chore(log): ignore /healthz request log (#464)
* chore(log): ignore /healthz request log

Add zerolog for gin httpd log

fixed: https://github.com/appleboy/gorush/issues/435

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove variable

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-05 16:57:55 +08:00
Bo-Yi Wu 2113dfc84e
chore(rpc): graceful shutdown for RPC server (#463)
graceful shutdown for grpc service.
2020-02-04 22:42:06 +08:00
Bo-Yi Wu bcd0e70252
feat(server): support graceful shutdown (#461)
* feat(server): support graceful shutdown

for http server

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-04 17:10:12 +08:00
Bo-Yi Wu ee0cc30e3d docs: fix typo
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-04 13:30:34 +08:00
Bo-Yi Wu 2d2a8a0110
feat(worker): support graceful shutdown (#459)
* feat(worker): support graceful shutdown

notifications workers and queue have been sent to APNs/FCM before shutdown a push notification.

send buffered channel to signal.Notify to avoid blocking

see: golang/lint#175

fixed: https://github.com/appleboy/gorush/issues/441

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-04 13:27:27 +08:00
Bo-Yi Wu bcf1c0cd03 chore(makefile): remove GOPKG variable
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-03 16:50:13 +08:00
Bo-Yi Wu 850509e77c
chore(healthy): disable proxy in healthy check (#457)
fixed: https://github.com/appleboy/gorush/issues/456

Don’t use Go’s default HTTP client (in production)

ref: https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
2020-01-25 10:16:41 +08:00
Viktor Radchenko c5a41eda4c Add support for Heroku (#447) 2020-01-25 08:23:54 +08:00
Sebastien Melki 5cb40cf5b4 [Important] allow sending data ONLY notifications for FCM notifi… (#453)
* allow sending data ONLY notifications for FCM notifications

ran into a little issue here need this tweak to be able to send and process background notifications on android

If you want to process android notifications in the BACKGROUND, they need to be data notifications, as in not contain the "notification" key in the payload.

This little change achieves it, because omitempty on structs for the JSON encoding does not work on sub-structs except if it is a pointer to it and set to nil.
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-01-20 23:14:07 +08:00
Bo-Yi Wu cd83da717d
chore: upgrade gofight and gin-status-api (#452)
* chore: upgrade gofight and gin-status-api

* chore: update testing
2020-01-13 23:05:27 +08:00
igorljubuncic 726184a55d Add support for building snaps (#387) 2019-12-08 09:37:27 +08:00
Cem KIY 682ca7fbad badger version upgrade to v1.6.0 (#439)
* badger version upgrade to v1.6.0

- excuted go mod tidy command
- fixed badger error when without go mod

* go mod tidy and update packages
2019-12-08 07:41:16 +08:00
Bo-Yi Wu 969af2c42b docs: Support HTTP, HTTPS or SOCKS5 proxy for apns and fcm 2019-12-08 07:33:26 +08:00
Keisuke Emi 1edfa9f532 Support HTTP proxy for APNs (#445) 2019-12-08 07:30:24 +08:00
Bo-Yi Wu 6f2b614265 chore: remove graceful restart feature 2019-11-29 07:17:41 +08:00
Bo-Yi Wu 00e5a596e2
chore: upgrade to gin v1.5 (#442)
* chore: upgrade to gin v1.5

* chore: fix testing error
2019-11-29 07:16:06 +08:00
Emmet McPoland d9aa8cb408 Allow APNS expiration to be 0 (#436) 2019-11-02 14:27:22 +08:00
Bo-Yi Wu 3bfcd1e822
chore: replace yarn with npm (#434)
* chore: replace yarn with npm

* chore: update node.js example
2019-10-27 12:13:40 +08:00
Bo-Yi Wu d86ccf15ea
fix: Cannot build for aws lambda (#433)
* fix: Cannot build for aws lambda

fix: https://github.com/appleboy/gorush/issues/432

* update command

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update command

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-10-27 11:13:49 +08:00
Bo-Yi Wu a49bf91e75
Some improve (#425)
* Some improve

1. Use bytes.Buffer.String or bytes.Buffer.Bytes
2. Use a single append to concatenate two slices
3. Poor file permissions used when creating file or using chmod
4. Using a deprecated function, variable, constant or field

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* improve

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-10-17 23:49:21 +08:00
Bo-Yi Wu 453c919510
chore: Don't send notification after client timeout or disconnected. (#431)
* chore: Don't send notification after client timeout or disconnected.

* add skip

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-10-17 23:19:25 +08:00
Bo-Yi Wu 92c02439fa chore: remove microbadge url 2019-10-16 23:40:46 +08:00
Bo-Yi Wu 2460d07c68 chore: update apns2 module 2019-10-16 23:40:14 +08:00
Sebastien Melki 7ddc7ed644 When queue is full, requests hang because Wait.Done() is not cal… (#430)
* if queue is full then mark notification as failed and unblock the wait group instead of hanging

* use WaitDone() function instead of calling Done() on notification wait group as it is safer
2019-10-16 15:08:24 +08:00
Amin 42d406b85f Fix typo in print error message (#429) 2019-10-16 15:01:58 +08:00
Bo-Yi Wu 38f7986e99 docs: update readme.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-10-07 10:07:50 +08:00
Lucas Machado ce4aaa99ef Update README.md (#427)
Corrected phrase.
2019-10-04 20:40:26 +08:00
Emmet McPoland 1c82f5c904 Added support for iOS13 with apns-push-type (#424) 2019-09-23 23:36:38 +08:00
Yassir Barchi 3812d357fd feat: add async feedback hook option (#414)
* feat: add async feedback hook option

* remove unnecessary return values

* review: check feedback's resp state

* fix embedmd error

* fix config test

* add feedback tests

* fix errcheck issues
2019-09-06 15:48:42 +08:00
Bo-Yi Wu eab5710100
chore(drone): upgrade to go 1.13 (#421)
* chore(drone): upgrade to go 1.13

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-09-06 15:25:30 +08:00
Bo-Yi Wu a495d00eca docs: update testing command 2019-07-21 21:55:26 +08:00
Bo-Yi Wu d4d8bc3b52
chore(module): remove gofight v1 (#416) 2019-06-18 01:17:48 +08:00
Bo-Yi Wu aa35465262 chore: upgrade gin-status-api 2019-06-11 02:07:01 +08:00
Bo-Yi Wu f0aeb2a873 feat(pkg): update go module 2019-06-11 01:52:07 +08:00
Bo-Yi Wu 80e833508f chore(package): upgrade gofight 2019-06-11 01:49:33 +08:00
dependabot[bot] a4b41daf2d chore(deps): bump tar from 2.2.1 to 2.2.2 in /rpc/example/node (#413)
Bumps [tar](https://github.com/npm/node-tar) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Commits](https://github.com/npm/node-tar/compare/v2.2.1...v2.2.2)
2019-06-06 23:17:04 +08:00
Bo-Yi Wu adcd6fed29 docs: update readme.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-05-21 14:33:35 +08:00
H 201413967c Add missing GRPC data field (#412)
* feat(grpc): add support for data field in request body

* docs: update Readme with embedmd
2019-05-21 14:10:32 +08:00
Bo-Yi Wu 33cddfa421 docs: update api_key description
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-05-06 14:35:41 +08:00
Bo-Yi Wu 55ff87f96f
chore: remove facebook graceful shutdown package. (#408)
* chore: remove facebook graceful shutdown package.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-04-29 11:33:27 +08:00
Bo-Yi Wu c08f593a86 feat: support gxz command for compressing and decompressing data 2019-04-27 23:45:28 +08:00
Bo-Yi Wu 27ec42543b
feat: add tryEnqueue function. (#406)
* feat: add tryEnqueue function.

tryEnqueue tries to enqueue a job to the given job channel. Returns true if
the operation was successful, and false if enqueuing would not have been
possible without blocking. Job is not enqueued in the latter case.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove inital worker

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-04-25 23:10:12 +08:00
Cem KIY 5b526a73bd fixed #402 item get value error fix (#404)
- bager rename badger
- Value method not usable, therfore changed to ValueCopy
2019-04-13 22:39:33 +08:00
Bo-Yi Wu 7b0750c807 docs: Add demo app build in flutter. 2019-04-08 23:42:58 +08:00
Bo-Yi Wu 6cc8e9f290 chore: update copyright year 2019-03-19 00:04:50 +08:00
Bo-Yi Wu 455a68acdf refactor: remove install misspell command in Makefine 2019-03-18 22:41:12 +08:00
Bo-Yi Wu bb7abb9a0a specific arch platform
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2019-03-18 14:16:29 +08:00
Helmi Rifai ae6c01bd67 Adds QueueUsage to prometheus metrics (same as /api/stat/app) (#401)
Exposes gorush_queue_usage metric to be used in prometheus so monitor internal queues

Useful to make sure we are coping well with traffic
2019-03-16 22:19:05 +08:00