Commit Graph

87 Commits

Author SHA1 Message Date
Bo-Yi.Wu fe402a578a fix(lint): golangci-lint warning.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-12-17 22:59:18 +08:00
Bo-Yi.Wu 111a7cce49 docs(config.yml): update comment.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-10-29 22:39:20 +08:00
Yuki Abe 24d2861f1c
docs(config): Add comments that sync mode only works if the queue engine is local. (#692)
Co-authored-by: yukia3e <12268087+yukia3@users.noreply.github.com>
2022-10-29 22:34:00 +08:00
Bo-Yi Wu a45769c24f
chore(queue): upgrade queue package and add metrics (#673)
* chore(queue): upgrade queue package and add metrics

add new metrics

	BusyWorkers    *prometheus.Desc
	SuccessTasks   *prometheus.Desc
	FailureTasks   *prometheus.Desc
	SubmittedTasks *prometheus.Desc

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

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

* chore: update go version

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2022-05-05 13:56:28 +08:00
Bo-Yi Wu 3f411ebe89
chore(queue): support Redis pub/sub (#652) 2022-01-01 23:04:13 +08:00
Bo-Yi Wu 4c1c87aecc
chore(conf): add default value for max_concurrent_pushes (#646) 2021-12-09 23:46:49 +08:00
Bo-Yi Wu 24c3492541 chore: update cluster testing
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-09-20 20:21:06 +08:00
Bo-Yi Wu 2b4cab0a95 docs: update format
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-09-20 20:19:41 +08:00
Bo-Yi Wu 83aaa37faf docs: add support redis cluster
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-09-20 20:00:20 +08:00
SianLoong 47222086ac
Allow redis to support cluster mode (#633) 2021-09-20 19:53:42 +08:00
Bo-Yi Wu 349c0c8c1d
fix: Function params involve heavy amount of copying (#622) 2021-08-02 14:07:30 +08:00
Bo-Yi Wu c51b4b2b65
chore(queue): Support NATS as backend (#618)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-08-01 21:06:47 +08:00
Bo-Yi Wu 990085fee7 chore: update default value.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-07-17 20:18:57 +08:00
Bo-Yi Wu 2e2dd9b8d6
chore(queue): support NSQ as backend. (#600) 2021-07-17 20:14:19 +08:00
Bo-Yi Wu ab8b1991ab
chore: support single queue and multiple worker (#589) 2021-07-16 12:10:34 +08:00
Bo-Yi Wu 0658f18430
chore: disabled Huawei notification by default (#590) 2021-07-16 11:51:34 +08:00
kerem 9c51cbc989
make Huawei configs compatible with HMS Core 4.0 (#561)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2021-03-28 22:13:02 +08:00
Bo-Yi Wu f34deb0eac chore: Nested if can be replaced with else-if 2021-01-23 09:52:06 +08:00
Bo-Yi Wu d77e7fe4f2 chore(style): fix format by gofumpt 2021-01-23 09:39:06 +08:00
M. Salih Karakaşlı 3918fab908
Add Huawei Mobile Services Support to Gorush (#523)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-09-04 11:01:21 +08:00
Emmet McPoland 685a87c930
Concurrent ios pushes (#497)
* Added the ability to concurrently call.push. Linter was complaining about "loop variable token captured by", need to determine if its a legitiment issue, as the lint message has now disappeared

* resolved "loop variable token captured by func literal" issue

* Ran make_fmt

* Moved max_concurrent_pushes to iOS

* Moved from limitgroup to sizedwaitgroup

* Removed SizedWaitGroup. Using client pool of 1 and buffered channels

* Fill client pool with the same client

* MaxConcurrentPushes is now applied across all running pushes

* Ran make fmt

* Corrected TestPushToIOS test

* Update README.md

Co-Authored-By: Yaroslav "Zorg" Zborovsky <yaronius@users.noreply.github.com>

* Added comment to config in all copies for max_concurrent_pushes

* Updated TestPushToIOS to be driven from config

Co-authored-by: Yaroslav "Zorg" Zborovsky <yaronius@users.noreply.github.com>
2020-04-23 21:02:53 +08:00
Bo-Yi Wu 4e05611577
chore(storage): support set db path for badger driver (#499)
* chore(storage): support set db path for badger driver

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

* fix path

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

* fix readme

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

* update default value

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2020-04-23 10:34:35 +08:00
Travis Cline 12842edd2c
docs: fix minor typo (#493) 2020-04-05 16:48:39 +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 c379630c29
chore(graceful): support custom timeout value (#466)
fixed: https://github.com/appleboy/gorush/issues/465
2020-02-05 23:23:16 +08:00
Keisuke Emi 1edfa9f532 Support HTTP proxy for APNs (#445) 2019-12-08 07:30:24 +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 3f223cf6c0
feat: switch to drone 1.0 (#399)
fix #397
2019-03-16 11:37:01 +08:00
Bo-Yi Wu 4f0f9f95a9 chore(config): check error from load yaml config. 2018-08-15 14:56:52 +08:00
sysradium bcf18d662a Set IOS key_path to an empty string (#359)
At the moment you can't start gorush with IOS base64 certificate provided using an ENV var. 

Apparently viper uses default value for the configuration field even if you set env var to an empty string. So `if var is not set` or `is set and string is empty` => default value.

Which means that if I only use env vars for configuration and I want to use IOS certificate in base64 I can not set `cert_path` to an empty string, so `gorush` uses base64 cert:

https://github.com/appleboy/gorush/blob/master/gorush/notification.go#L180

I.e.:
```
ORUSH_IOS_ENABLED=true GORUSH_IOS_KEY_PATH="" GORUSH_IOS_KEY_TYPE=p12  GORUSH_IOS_KEY_BASE64="SOME_BASE64" go run main.go
(config.SectionIos) {
 Enabled: (bool) true,
 KeyPath: (string) (len=7) "key.pem", <--- still key.pem
 KeyBase64: (string) (len=2) "SOME_BASE64",
 KeyType: (string) (len=3) "p12",
 Password: (string) "",
 Production: (bool) false,
 MaxRetry: (int) 0,
 KeyID: (string) "",
 TeamID: (string) ""
}
FATA[2018/06/10 - 12:42:09] certificate file does not exist
```
So by default `KeyPath` should an empty string. Then I can set only if I want.
2018-06-20 09:34:49 +08:00
Bo-Yi Wu 2d2f62d19b
feat(iOS): load iOS key from base64 input. (#336)
* feat(iOS): load iOS key from base64 input.

* test: check key type exist.
2018-02-18 17:12:51 +08:00
Bo-Yi Wu e99692717c support custom url for health URI. (#302)
* support custom url for health URI.

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

* fix readme

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 21:19:58 -05:00
Bo-Yi Wu c06e819e08 Support new Apple Token Based Authentication (JWT) (#300)
* Support new Apple Token Based Authentication (JWT)

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

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 03:49:23 -05:00
Bo-Yi Wu f3480d2dd8 Support global ENV setting. (#293)
* Support global ENV setting.

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

* add viper package

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

* fix typo

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

* fix testing.

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

* fix testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-22 22:06:30 -05:00
Bo-Yi Wu 6d29e638b4 change grpc port to 9000 (#291)
* change grpc port to 9000

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

* change grpc port to 9000

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-18 20:24:47 -05:00
Bo-Yi Wu e070248a11 fix lint error for gorush folder. (#275)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-23 21:46:00 -05:00
Bo-Yi Wu 83d155bade docs(config): add bind address doc. (#264) 2017-07-31 16:37:56 +08:00
Simone Basso a714d03e2c feature(server): allow to bind specific addresses (#263)
The main use case for ooniprobe is to bind 127.0.0.1 only.
2017-07-31 16:31:07 +08:00
Bo-Yi Wu 00ff0248a2 feat(config): enable or disable httpd server. (#262) 2017-07-27 11:19:36 +08:00
Bo-Yi Wu a2143d4fce docs(readme): add grpc documentation. 2017-07-26 09:38:28 +08:00
Bo-Yi Wu 41a8a609be feat(config): add grpc config. (#255) 2017-07-24 18:58:30 +08:00
Bo-Yi Wu 77bce18c9f feat: upgrade gcm to fcm (#231)
https://github.com/edganiukov/fcm

fix #230
2017-05-31 22:56:10 -05:00
Bo-Yi Wu a16196d56a docs: [ci skip] improve comment. 2017-04-12 10:59:40 +08:00
Bo-Yi Wu 672b50f07f docs: [ci skip] update readme 2017-04-10 11:53:42 +08:00
Bo-Yi Wu b6997ea792 feat: support sync mode for http response. (#208)
* feat: support sync mode for http response.

* fix: update readme.

* fix: check wg exist.

* fix: testing sync mode.
2017-04-06 15:00:49 +08:00
Bo-Yi Wu 97eae1fab4 feat: support Automatically install TLS certificates from Let's Encrypt. (#205)
* feat: support Automatically install TLS certificates from Let's Encrypt.

* refactor: update tls server.

* fix: missing tls package.

* fix: drop 1.6.x support

* docs: update readme.

* fix: listen tcp :443: bind: permission denied
2017-04-05 12:03:43 +08:00
Bo-Yi Wu e9dc429cb8 feat: embed code into markdown and keep everything in sync (#191)
* feat: embed code into markdown and keep everything in sync

* fix: update readme.

* fix: update travis.
2017-02-25 20:31:49 +08:00
Bo-Yi Wu f155e20fa2 fix: Remove unnecessary type conversions (#176) 2017-01-27 18:19:39 +08:00
Bo-Yi Wu 962c033246 feat: set runtime.NumCPU() as default worker num value (#174) 2017-01-25 16:29:35 +08:00
Bo-Yi Wu a669070ffb feat: support prometheus metric url. (#168) 2017-01-19 16:56:30 +08:00