redis

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL