Skip to content

Commit 1231032

Browse files
psrbr157@gmail.compsrbr157@gmail.com
authored andcommitted
Add policy and default policy
1 parent de1ecc0 commit 1231032

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

internal/limiter/policy.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
// internal/limiter/policy.go
1+
package limiter
2+
3+
import "time"
4+
5+
type Policy struct {
6+
Limit int
7+
Window time.Duration
8+
BurstLimit int
9+
}
10+
11+
var DefaultPolicy = Policy{
12+
Limit: 100,
13+
Window: time.Minute
14+
}

0 commit comments

Comments
 (0)