diff --git a/README.md b/README.md index 6a045ba..749b94e 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ A push notification micro server using [Gin](https://github.com/gin-gonic/gin) f - [FCM](https://firebase.google.com/) - [HMS](https://developer.huawei.com/consumer/en/hms/) -[A live demo on Netlify](https://gorush.netlify.com/). +[A live demo on Netlify](https://gorush.netlify.app/). ## Features @@ -90,7 +90,7 @@ A push notification micro server using [Gin](https://github.com/gin-gonic/gin) f - Support send notification through [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) protocol, we use [gRPC](https://grpc.io/) as default framework. - Support running in Docker, [Kubernetes](https://kubernetes.io/) or [AWS Lambda](https://aws.amazon.com/lambda) ([Native Support in Golang](https://aws.amazon.com/blogs/compute/announcing-go-support-for-aws-lambda/)) - Support graceful shutdown that workers and queue have been sent to APNs/FCM before shutdown service. -- Support different Queue as backend like [NSQ](https://nsq.io/), [NATS](https://nats.io/) or [Redis Pub/Sub](https://redis.io/topics/pubsub), defaut engine is local [Channel](https://tour.golang.org/concurrency/2). +- Support different Queue as backend like [NSQ](https://nsq.io/), [NATS](https://nats.io/) or [Redis streams](https://redis.io/docs/manual/data-types/streams/), defaut engine is local [Channel](https://tour.golang.org/concurrency/2). See the default [YAML config example](config/testdata/config.yml): @@ -475,9 +475,11 @@ Show success or failure counts information of notification. ```json { "version": "v1.6.2", - "queue_max": 8192, - "queue_usage": 0, - "total_count": 77, + "busy_workers": 0, + "success_tasks": 32, + "failure_tasks": 49, + "submitted_tasks": 81, + "total_count": 81, "ios": { "push_success": 19, "push_error": 38 diff --git a/tests/README.md b/tests/README.md index c2a051d..01d860a 100644 --- a/tests/README.md +++ b/tests/README.md @@ -32,3 +32,16 @@ run the following command. ```sh bat POST localhost:8088/api/push < tests/test.json ``` + +Here is a sample shell code to calculate factorial using while loop: + +```sh +#!/bin/bash +counter=$1 +while [ $counter -gt 0 ] +do + bat POST https://gorush.netlify.app/api/push < tests/test.json + counter=$(( $counter - 1 )) + echo $counter +done +``` diff --git a/tests/test.json b/tests/test.json index 90a28e0..c88a7c4 100644 --- a/tests/test.json +++ b/tests/test.json @@ -3,12 +3,20 @@ { "tokens": ["token_a", "token_b"], "platform": 1, - "message": "Hello World iOS!" + "message": "Hello World iOS!", + "title": "Gorush with iOS" }, { "tokens": ["token_a", "token_b"], "platform": 2, - "message": "Hello World Android!" + "message": "Hello World Android!", + "title": "Gorush with Android" + }, + { + "tokens": ["token_a", "token_b"], + "platform": 3, + "message": "Hello World Huawei!", + "title": "Gorush with HMS" } ] }