defaults dont work for conf
This commit is contained in:
@@ -3,12 +3,16 @@ package server
|
||||
import (
|
||||
"local/rproxy3/config"
|
||||
"local/rproxy3/storage"
|
||||
|
||||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
func New() *Server {
|
||||
port := config.GetPort()
|
||||
r, b := config.GetRate()
|
||||
return &Server{
|
||||
db: storage.NewMap(),
|
||||
addr: port,
|
||||
db: storage.NewMap(),
|
||||
addr: port,
|
||||
limiter: rate.NewLimiter(rate.Limit(r), b),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user