Removed exported methods from ratelimiter package

This commit is contained in:
Mathias Hall-Andersen
2018-02-11 23:01:55 +01:00
parent 5f0a91a127
commit 8bdadaae59
2 changed files with 38 additions and 42 deletions

View File

@@ -28,7 +28,7 @@ func TestRatelimiter(t *testing.T) {
)
}
for i := 0; i < RatelimiterPacketsBurstable; i++ {
for i := 0; i < packetsBurstable; i++ {
Add(RatelimiterResult{
allowed: true,
text: "inital burst",
@@ -42,7 +42,7 @@ func TestRatelimiter(t *testing.T) {
Add(RatelimiterResult{
allowed: true,
wait: Nano(time.Second.Nanoseconds() / RatelimiterPacketsPerSecond),
wait: Nano(time.Second.Nanoseconds() / packetsPerSecond),
text: "filling tokens for single packet",
})
@@ -53,7 +53,7 @@ func TestRatelimiter(t *testing.T) {
Add(RatelimiterResult{
allowed: true,
wait: 2 * Nano(time.Second.Nanoseconds()/RatelimiterPacketsPerSecond),
wait: 2 * (Nano(time.Second.Nanoseconds() / packetsPerSecond)),
text: "filling tokens for two packet burst",
})