redis_kits

package module
v0.0.0-...-0d68549 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

README

redis-kits

介绍

{以下是码云平台说明,您可以替换此简介 码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 https://gitee.com/enterprises}

软件架构

软件架构说明

安装教程
  1. xxxx
  2. xxxx
  3. xxxx
使用说明
  1. xxxx
  2. xxxx
  3. xxxx
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
码云特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. 码云官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解码云上的优秀开源项目
  4. GVP 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
  5. 码云官方提供的使用手册 https://gitee.com/help
  6. 码云封面人物是一档用来展示码云会员风采的栏目 https://gitee.com/gitee-stars/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExistLock

func ExistLock(lockName string) (bool, error)

检查锁是否存在

func GetConfig

func GetConfig() (*config, error)

func GetLock

func GetLock(lockName string, timeout time.Duration) error

获取Redis锁

func ReleaseLock

func ReleaseLock(lockName string) error

释放Redis锁

Types

type RedisClient

type RedisClient interface {
	Set(string, interface{}, time.Duration) error
	SetNX(string, interface{}, time.Duration) error
	Delete(...string) error
	Incr(string) (int64, error)
	RPush(string, interface{}) error
	LPush(string, interface{}) error
	Pull(string) ([]string, error)
	Pop(string) ([]string, error)
	Subscribe(string) *redis.PubSub
	Publish(string, string) error
	Get(string) string
	Ping() error
	Exists(string) (bool, error)
}

func GetClient

func GetClient() (RedisClient, error)

Jump to

Keyboard shortcuts

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