add conn limiter
This commit is contained in:
10
limiter/conn/limiter.go
Normal file
10
limiter/conn/limiter.go
Normal file
@ -0,0 +1,10 @@
|
||||
package conn
|
||||
|
||||
type Limiter interface {
|
||||
Allow(n int) bool
|
||||
Limit() int
|
||||
}
|
||||
|
||||
type ConnLimiter interface {
|
||||
Limiter(key string) Limiter
|
||||
}
|
Reference in New Issue
Block a user