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
The folder contains a sample data.txt
file for testing.
Replace --url
value with a valid url.
- Run directly
go run main.go --url=https://webhook.site/f30d570f-20ac-4211-a389-2f3696e1fa45 < data.txt --i=3s
- Build binary and run
go build
./notifier-cli --url=https://webhook.site/f30d570f-20ac-4211-a389-2f3696e1fa45 < data.txt --i=3s
tests are available for the notifier library/package
go test ./...