cascmd

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCasCmd

func NewCasCmd(client *redis.Client) try_lock.CASCommand

Types

type MemoryImpl

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

func NewMemoryImpl

func NewMemoryImpl() *MemoryImpl

func (*MemoryImpl) CAS

func (x *MemoryImpl) CAS(key, src, dst string) bool

type RedisImpl

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

func (*RedisImpl) CAS

func (x *RedisImpl) CAS(key, src, dst string) bool

CAS 如果 src 不等于 key 对应的值,则 false 如果 src 等于 key 对应的值,则赋予新值并返回 true

Jump to

Keyboard shortcuts

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