distlock

package
v1.3.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DistLock

type DistLock interface {
	Lock(timeout int) bool
	Unlock()
}

type RdsLuaLock

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

func NewRdsLuaLock

func NewRdsLuaLock(dbKey, key string, expire int) (*RdsLuaLock, error)

func (*RdsLuaLock) Lock

func (l *RdsLuaLock) Lock(ctx context.Context, timeout int) bool

func (*RdsLuaLock) TryLock

func (l *RdsLuaLock) TryLock(ctx context.Context) bool

func (*RdsLuaLock) Unlock

func (l *RdsLuaLock) Unlock(ctx context.Context)

Jump to

Keyboard shortcuts

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