https://github.com/solutionstack/notifier-cli
https://github.com/solutionstack/notifier-cli
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/solutionstack/notifier-cli
- Owner: solutionstack
- License: gpl-3.0
- Created: 2022-07-08T13:55:06.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-07-28T12:00:25.000Z (almost 3 years ago)
- Last Synced: 2024-12-31T17:47:14.683Z (6 months ago)
- Language: Go
- Size: 3.59 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# notifier-cli
### Sample program to handle arbitrarily large list messages to a specific url, using semaphoes to control the number of spawned routines where the url call is made
http POST requests to a configured url.Data is read from STDIN and the rate of sending can be controlled via
`--i or --interval eg --i=5s` parameter
### Usage:The folder contains a sample `data.txt` file for testing.
Replace `--url` value with a valid url.
1. Run directly
```
go run main.go --url=https://webhook.site/f30d570f-20ac-4211-a389-2f3696e1fa45 < data.txt --i=3s
```2. Build binary and run
```
go build./notifier-cli --url=https://webhook.site/f30d570f-20ac-4211-a389-2f3696e1fa45 < data.txt --i=3s
```### Tests:
tests are available for the notifier library/package
```
go test ./...
```