Commit Graph

780 Commits

Author SHA1 Message Date
Romanenko Alexey 983aeeb33d
#446 fix context (#484) 2020-03-14 00:06:44 +08:00
Bo-Yi Wu 44bf37941b
chore(grpc): add image field (#485) 2020-03-14 00:00:03 +08:00
Bo-Yi Wu 38f11f0592 chore: fix import path. 2020-03-10 21:10:18 +08:00
Slava Romanov d06e4a2337
solve https://github.com/appleboy/gorush/issues/476 (#481)
* solve https://github.com/appleboy/gorush/issues/476

* add logging to start gRPC server (tcp listener)
change grpc.Server.Stop -> grpc.Server.GracefulStop
add grpc server_test
remove async functions from rpc/server.go

* add logging to err in rpc/server.go
2020-03-10 21:09:03 +08:00
Bo-Yi Wu eb136d137a
chore: support dockerfile lint. (#479) 2020-03-01 20:31:28 +08:00
Yaroslav "Zorg" Zborovsky b58386704c
Fix Redis stats storage concurrency issues (#478) 2020-02-29 17:14:44 +08:00
Romanenko Alexey cbab088ed4
fix fcm notification (#474)
* fix fcm notification

* fix fcm notification for unit test

Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-27 13:40:21 +08:00
Bo-Yi Wu cde026d9f9
chore(go): update to go 1.14 (#475)
* chore(go): update to go 1.14

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

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-27 13:17:20 +08:00
Bo-Yi Wu 52622558bd
chore(gorush): add timeout for http client (#473)
* chore(gorush): add timeout for http client

dispatch feedback url

See: https://github.com/appleboy/gorush/issues/449

* docs: update readme
2020-02-24 22:18:50 +08:00
Bo-Yi Wu e85252b4ae chore: remove docker build command 2020-02-19 23:55:23 +08:00
Emmet McPoland dbc57cd828
Allow ability to explicitly set APNS priority (#437)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-07 11:50:20 +08:00
Bo-Yi Wu cee47bdc2c chore(module): remove unused module
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-02-07 11:41:05 +08:00
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