Added new stats reporter to check suitable redis pool size

This commit is contained in:
ErickSkrauch
2020-05-01 02:46:12 +03:00
parent 5dbe6af1d0
commit aabf54e318
8 changed files with 94 additions and 0 deletions

View File

@@ -243,6 +243,10 @@ func (db *Redis) Ping() error {
return nil
}
func (db *Redis) Avail() int {
return db.pool.Avail()
}
func buildUsernameKey(username string) string {
return "username:" + strings.ToLower(username)
}