dlock

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: MIT Imports: 3 Imported by: 0

README

dlock

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLockIsHeld     = errors.New("[dlock] failed to acquire lock, the lock is held by another process")
	ErrReleaseNotHeld = errors.New("[dlock] can not release the lock that not held")
	ErrRefreshNotHeld = errors.New("[dlock] can not refresh the lock that not held")
)

Functions

This section is empty.

Types

type Dclient

type Dclient interface {
	NewDlock(ctx context.Context, key string, expiration time.Duration) (Dlock, error)
}

type Dlock

type Dlock interface {
	TryLock(ctx context.Context) error
	Unlock(ctx context.Context) error
	Refresh(ctx context.Context) error
}

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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