dlock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DLockInterface

type DLockInterface interface {
	Lock(key string, duration time.Duration) (bool, error)
	Release(key string) (bool, error)
}

func NewRedisDLock

func NewRedisDLock(instance redis.UniversalClient) DLockInterface

type DLockRedis

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

func (*DLockRedis) Lock

func (d *DLockRedis) Lock(key string, duration time.Duration) (bool, error)

func (*DLockRedis) Release

func (d *DLockRedis) Release(key string) (bool, error)

Jump to

Keyboard shortcuts

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