A sliding window algorithm-based request counter server implemented in go.
- Counts received requests within an interval, based on
windowargument (default 60 seconds), with millisecond accuracy - Autosaves to a file using an interval based on
autosaveargument (default 30 seconds)
go run ./main.go -addr string
address the server listens (default ":3000")
-autosave string
autosave interval (default "30s")
-save string
file path the state will be saved to (default "/tmp/requestcounter.json")
-window string
window of the request counter (default "60s")