redis

package
v0.0.0-...-c2450c0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisConnectionFactory

type RedisConnectionFactory struct {
	Redis_url      string
	Redis_password string
}

简单工厂

func (RedisConnectionFactory) Close

func (factory RedisConnectionFactory) Close(conn redis.Conn)

关闭连接

func (RedisConnectionFactory) GetConnection

func (factory RedisConnectionFactory) GetConnection() (redis.Conn, error)

新开一个连接

type RedisTemplete

type RedisTemplete struct {
	ConnectionFactory *RedisConnectionFactory
}

func (RedisTemplete) Delete

func (templete RedisTemplete) Delete(key string) error

func (RedisTemplete) Get

func (templete RedisTemplete) Get(key string) (string, error)

func (RedisTemplete) ListLPop

func (templete RedisTemplete) ListLPop(key string) (string, error)

func (RedisTemplete) ListLPush

func (templete RedisTemplete) ListLPush(key string, value string) error

func (RedisTemplete) ListRPop

func (templete RedisTemplete) ListRPop(key string) (string, error)

func (RedisTemplete) ListRPush

func (templete RedisTemplete) ListRPush(key string, value string) error

func (RedisTemplete) New

func (it RedisTemplete) New(url string, password string) RedisTemplete

func (RedisTemplete) Set

func (templete RedisTemplete) Set(key string, value string, expireSeconds int64) error

Jump to

Keyboard shortcuts

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