locks

package
v1.1.0-beta5 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package locks provides Named Locks functionality for manging mutexes by string name (e.g., cache keys).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamedLock

type NamedLock interface {
	Release() error
	RRelease() error
	Upgrade() (NamedLock, error)
	WriteLockCounter() int
	WriteLockMode() bool
}

NamedLock defines the interface for implementing Named Locks

type NamedLocker

type NamedLocker interface {
	Acquire(string) (NamedLock, error)
	RAcquire(string) (NamedLock, error)
}

NamedLocker provides a locker for handling Named Locks

func NewNamedLocker

func NewNamedLocker() NamedLocker

NewNamedLocker returns a new Named Locker

Jump to

Keyboard shortcuts

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