Documentation ¶ Index ¶ type ConfigRedis type Item type Redis func New(cfg *ConfigRedis) *Redis func (db *Redis) Down() error func (db *Redis) Get(name string) (*conn, error) func (db *Redis) Up() error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type ConfigRedis ¶ type ConfigRedis struct { DB []Item `yaml:"redis"` } type Item ¶ type Item struct { Name string `yaml:"name"` Host string `yaml:"host"` Port int `yaml:"port"` DB int `yaml:"db"` Passwd string `yaml:"passwd"` TTL int `yaml:"ttl"` Pool int `yaml:"pool"` } type Redis ¶ type Redis struct { // contains filtered or unexported fields } func New ¶ func New(cfg *ConfigRedis) *Redis func (*Redis) Down ¶ func (db *Redis) Down() error func (*Redis) Get ¶ func (db *Redis) Get(name string) (*conn, error) func (*Redis) Up ¶ func (db *Redis) Up() error Source Files ¶ View all Source files config.go conn.go redis.go Click to show internal directories. Click to hide internal directories.