A non-blocking notification Go client library.
Run:
cd ./notify
And then run:
go get ./...
- Start the server.
go run cmd/listener/main.go
- Start the cli.
go run cmd/cli/main.go --url http://localhost:6340 --interval 1s
go run cmd/cli/main.go --url http://localhost:6340 --interval 1s < messages.txt
Note: You can observe the requests in the listener console
Using an external server (e.g., https://jsonplaceholder.typicode.com/posts):
go run cmd/cli/main.go --url https://jsonplaceholder.typicode.com/posts --interval 1s
go test -v -cover ./... -count=1