redisx

package module
v0.0.0-...-91aa13a Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutex

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

func (*Mutex) Key

func (mu *Mutex) Key() string

func (*Mutex) Lock

func (mu *Mutex) Lock(ttl int64) (bool, error)

func (*Mutex) Unlock

func (mu *Mutex) Unlock() (err error)

type Rds

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

func New

func New(dial, password string, db int) *Rds

func (*Rds) Del

func (p *Rds) Del(k string) (err error)

func (*Rds) FlushDB

func (p *Rds) FlushDB() (err error)

func (*Rds) Get

func (p *Rds) Get(key string) (v []byte, err error)

func (*Rds) Keys

func (p *Rds) Keys() (keys []string, err error)

func (*Rds) Lock

func (p *Rds) Lock(key string, ttl int) error

Lock 锁住key

func (*Rds) NewMutex

func (p *Rds) NewMutex(key string) *Mutex

NewMutex 返回互斥量Mutex

func (*Rds) Set

func (p *Rds) Set(key string, value []byte) (err error)

func (*Rds) SetEX

func (p *Rds) SetEX(k string, expire int, v interface{}) (err error)

func (*Rds) SetNX

func (p *Rds) SetNX(k string, v interface{}) (err error)

func (*Rds) UnLock

func (p *Rds) UnLock(key string) (err error)

UnLock 解锁key

Jump to

Keyboard shortcuts

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