lease

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LeaseClaimDeniedErr = errors.New("lease claim denied")
	NotLeaseOwnerErr    = errors.Unauthorizedf("caller did not own lease for namespace")
)

Functions

func Manager

func Manager() *leaseManager

Manager returns a manager.

func WorkerLoop

func WorkerLoop(persistor leasePersistor) func(<-chan struct{}) error

WorkerLoop returns a function which can be utilized within a worker.

Types

type Token

type Token struct {
	Namespace, Id string
	Expiration    time.Time
}

Token represents a lease claim.

Jump to

Keyboard shortcuts

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