locker

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 1 Imported by: 0

README

locker

Usage

Start using it

Download and install it:

go get github.com/gomooth/locker

Import it in your code:

import "github.com/gomooth/locker"

Locks

Redis Lock

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLockOccupied = errors.New("lock is occupied")
)

Functions

This section is empty.

Types

type ILocker

type ILocker interface {
	// Lock 获得锁
	Lock(key string) error
	// UnLock 释放锁
	UnLock(key string) error
}

ILocker 锁约定

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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