redis

package
v0.0.0-...-0927df6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client 定义一个redis客户端结构体

func GetOneRedisClient

func GetOneRedisClient() *Client

GetOneRedisClient 从连接池获取一个redis连接

func (*Client) Bool

func (r *Client) Bool(reply interface{}, err error) (bool, error)

Bool 类型转换

func (*Client) Bytes

func (r *Client) Bytes(reply interface{}, err error) ([]byte, error)

Bytes 类型转换

func (*Client) Execute

func (r *Client) Execute(cmd string, args ...interface{}) (interface{}, error)

Execute 为redis-go 客户端封装统一操作函数入口

func (*Client) Float64

func (r *Client) Float64(reply interface{}, err error) (float64, error)

Float64 类型转换

func (*Client) Flush

func (r *Client) Flush() error

Flush 清空

func (*Client) Get

func (r *Client) Get(args ...interface{}) (interface{}, error)

Get

func (*Client) Int

func (r *Client) Int(reply interface{}, err error) (int, error)

Int int 类型转换

func (*Client) Int64

func (r *Client) Int64(reply interface{}, err error) (int64, error)

Int64 int64 类型转换

func (*Client) ReleaseOneRedisClient

func (r *Client) ReleaseOneRedisClient()

ReleaseOneRedisClient 释放连接到连接池

func (*Client) Set

func (r *Client) Set(args ...interface{}) (interface{}, error)

Set

func (*Client) String

func (r *Client) String(reply interface{}, err error) (string, error)

string 类型转换

func (*Client) Strings

func (r *Client) Strings(reply interface{}, err error) ([]string, error)

Strings strings 类型转换

func (*Client) Uint64

func (r *Client) Uint64(reply interface{}, err error) (uint64, error)

Uint64 uint64 类型转换

Jump to

Keyboard shortcuts

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