locks

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCK operation = iota
	UNLOCK
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Unlocker

type Unlocker interface {
	Unlock()
}

Interface for unlocking a key that was provided to Lock()

func Lock

func Lock(key string) Unlocker

Provides an application-wide lock on the provided key. If the lock is obtained, it will return an Unlocker. If the lock is not successfully obtained, nil will be returned.

Jump to

Keyboard shortcuts

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