Skip to content

Commit

Permalink
chore: fix port type
Browse files Browse the repository at this point in the history
  • Loading branch information
gussf committed Jun 6, 2024
1 parent 54b2582 commit 5065f28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ rateLimiter:
rpm: 100
redis:
host: "localhost"
port: "6379"
port: 6379
password: ""
test: false
2 changes: 1 addition & 1 deletion config/docker_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ rateLimiter:
rpm: 100
redis:
host: "redis"
port: "6379"
port: 6379
password: ""
test: true
2 changes: 1 addition & 1 deletion config/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ rateLimiter:
rpm: 100
redis:
host: "localhost"
port: "6379"
port: 6379
password: ""
test: true
4 changes: 2 additions & 2 deletions extensions/rate_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ type rateLimiter struct {

func NewRateLimiter(config *viper.Viper, logger *logrus.Logger) rateLimiter {
host := config.GetString("rateLimiter.redis.host")
port := config.GetString("rateLimiter.redis.port")
port := config.GetInt("rateLimiter.redis.port")
pwd := config.GetString("rateLimiter.redis.password")
limit := config.GetInt("rateLimiter.limit.rpm")
isTest := config.GetBool("rateLimiter.test")

addr := fmt.Sprintf("%s:%s", host, port)
addr := fmt.Sprintf("%s:%d", host, port)
opts := &redis.Options{
Addr: addr,
Password: pwd,
Expand Down

0 comments on commit 5065f28

Please sign in to comment.