项目作者: beiping96

项目描述 :
Redis (Cluster) driver
高级语言: Go
项目地址: git://github.com/beiping96/rd.git
创建时间: 2019-08-30T03:52:22Z
项目社区:https://github.com/beiping96/rd

开源协议:Apache License 2.0

下载


RD

Redis (Cluster) Driver

Build Status
GoDoc
Go Report Card

Simple Usage

  1. package main
  2. import (
  3. "github.com/beiping96/rd"
  4. )
  5. func main() {
  6. cfg := rd.Config{
  7. IsCluster: true,
  8. Address: "127.0.0.1:6379",
  9. }
  10. cli, err := rd.NewClient(cfg)
  11. if err != nil {
  12. // handle err
  13. }
  14. defer cli.Close()
  15. _, err := cli.DoString("GET", "not_exist_key")
  16. if err == cli.ErrNil() {
  17. // key not exist
  18. } else if err != nil {
  19. // handle err
  20. }
  21. }

With Instance

Instance Example