locks

package
v0.0.0-...-33208af Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(options Options)

Types

type LocalLock

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

func (*LocalLock) Lock

func (l *LocalLock) Lock(resource string) bool

func (*LocalLock) Unlock

func (l *LocalLock) Unlock() bool

type LockIFace

type LockIFace interface {
	Lock(resource string) bool
	Unlock() bool
}

type Options

type Options struct {
	Addr string
	DB   int
}

Addr: host:port DB: database

type RedLock

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

func (*RedLock) Lock

func (l *RedLock) Lock(resource string) bool

func (*RedLock) Unlock

func (l *RedLock) Unlock() bool

Jump to

Keyboard shortcuts

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