distributedlock

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock interface {
	// Acquire acquires a lease of duration ttl around a given resource. In case of an error,
	// acquired is meaningless.
	Acquire(resource string, ttl time.Duration) (acquired bool, err error)

	// Forfeit forfeits a lease around a given resource. In case of an error,
	// forfeited is meaningless.
	Forfeit(resource string) (forfeited bool, err error)
}

Lock uses distributed lock for control of a resource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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