redislock

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestroyLock

func DestroyLock(lock *Lock) error

Types

type Lock

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

func NewLock

func NewLock(address string, password string, db int) (*Lock, error)

func (*Lock) Lock

func (lock *Lock) Lock(ownerID string, key string, expireSec int) error

func (*Lock) TryLock

func (lock *Lock) TryLock(ownerID string, key string, expireSec int) (bool, error)

func (*Lock) Unlock

func (lock *Lock) Unlock(ownerID string, key string) error

Jump to

Keyboard shortcuts

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