redis

package
v0.0.0-...-e86600b Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

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

func NewLock

func NewLock(cli redis.Redis, key string, ttl int) *Lock

NewLock 初始化

func (*Lock) Lock

func (l *Lock) Lock() error

Lock 加锁

func (*Lock) Unlock

func (l *Lock) Unlock() error

Unlock 解锁

Jump to

Keyboard shortcuts

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