This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
schisandra-cloud-album/config/conf_redis.go
2024-08-06 13:17:03 +08:00

20 lines
516 B
Go

package config
import "time"
type Redis struct {
Host string `yaml:"host"`
Port string `yaml:"port"`
Password string `yaml:"password"`
Db int `yaml:"db"`
MaxActive int `yaml:"max-active"`
MaxIdle int `yaml:"max-idle"`
MinIdle int `yaml:"min-idle"`
PoolSize int `yaml:"pool-size"`
PoolTimeout time.Duration `yaml:"pool-timeout"`
}
func (r *Redis) Addr() string {
return r.Host + ":" + r.Port
}