mirror of
https://github.com/crazybber/go-pattern-examples.git
synced 2024-11-23 04:16:02 +03:00
19 lines
313 B
Go
19 lines
313 B
Go
package ratelimit
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
/*
|
|
|
|
Rate limiting is an very important mechanism
|
|
With limiting you can controll resource utilization and maintain quality of service.
|
|
Go supports rate limiting by using goroutines, channels, and tickers.
|
|
*/
|
|
|
|
func TestRateLimiting(t *testing.T) {
|
|
|
|
rateLimiting(5, 3)
|
|
|
|
}
|