multilock

package module
v0.0.0-...-c9afc18 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 3 Imported by: 0

README

Multilock

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLockAlreadyExist = xerrors.Errorf("lock already exist")

	ErrLockNotExist = xerrors.Errorf("lock not exist")
)

Functions

This section is empty.

Types

type MultiLock

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

func New

func New(cap uint) *MultiLock

func (*MultiLock) Add

func (ml *MultiLock) Add(key string) error

func (*MultiLock) Count

func (ml *MultiLock) Count() int

func (*MultiLock) List

func (ml *MultiLock) List() map[string]bool

func (*MultiLock) Lock

func (ml *MultiLock) Lock(key string) error

func (*MultiLock) Locked

func (ml *MultiLock) Locked(key string) bool

func (*MultiLock) Remove

func (ml *MultiLock) Remove(key string) error

func (*MultiLock) Unlock

func (ml *MultiLock) Unlock(key string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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