redisclient

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConnTimeout = time.Second * 3
	OperTimeout = time.Second * 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TRedisClient

type TRedisClient struct {
	SavePath              string `json:"save_path"`
	Poolsize              int    `json:"poolsize"`
	Password              string `json:"password"`
	DbNum                 int    `json:"db_num"`
	IdleTimeoutStr        string `json:"idle_timeout"`
	IdleCheckFrequencyStr string `json:"idle_check_frequency"`
	MaxRetries            int    `json:"max_retries"`
	// contains filtered or unexported fields
}

func (*TRedisClient) Del

func (Self *TRedisClient) Del(key string) (bool, error)

*

  • Del Single Key

func (*TRedisClient) Exists

func (Self *TRedisClient) Exists(key string) bool

*

  • Exists Single Key

func (*TRedisClient) Get

func (Self *TRedisClient) Get(key string) (string, error)

*

  • Get Single Key

func (*TRedisClient) GetClient

func (rp *TRedisClient) GetClient() *rediss.ClusterClient

func (*TRedisClient) GetExpire

func (Self *TRedisClient) GetExpire(key string) (time.Duration, error)

*

  • GetExpire Single Key

func (*TRedisClient) GetHead

func (Self *TRedisClient) GetHead() string

func (*TRedisClient) Init

func (rp *TRedisClient) Init(cfgStr string) error

func (*TRedisClient) Pub

func (rp *TRedisClient) Pub(topic, msg string) (int64, error)

发送主题

func (*TRedisClient) Set

func (Self *TRedisClient) Set(key string, value string, args ...interface{}) (bool, error)

*

  • Set Value

func (*TRedisClient) SetHead

func (Self *TRedisClient) SetHead(head string)

func (*TRedisClient) Sub

func (rp *TRedisClient) Sub(topic string) *rediss.PubSub

订阅主题

Jump to

Keyboard shortcuts

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