package
0.0.0-20160914141726-67f4a39fdd9e
Repository: https://github.com/hailooss/service.git
Documentation: pkg.go.dev

# Functions

AnonymousRelease will release the reservation of the item with the given id and path.
CleanupRegionLeaders is a cleanup callback function which is run when the service is interrupted and rescinds any outstanding region leaders.
GlobalLock attempts to achieve a lock using default timing values of 1 second and 5 seconds.
GlobalTimedLock attempts to achieve a global lock on `id`, waiting for `waitFor` time in case of contention (before giving up) and reserving the lock for a maximum `holdFor` in the event of failure NOTE: locks can and will be held for longer than `holdFor`, but in the case of failure (eg: binary crashes) then this is the maximum amount of time other programs will hang around contending for the now defunkt lock.
NewGlobalLocker returns a global leader which is basically just a region leader pinned to one region based on config.
NewReservation creates a default reservation.
RegionLeader block indefinitely until this invocation has been elected the "leader" within the local operating region.
RegionLock attempts to achieve a lock using default timing values.
RegionTimedLock attempts to achieve a regional lock on `id`, waiting for `waitFor` time in case of contention (before giving up) and reserving the lock for a maximum `holdFor` in the event of failing to Unlock().
SetRegionLockNamespace should be set to the service name on startup, and never again!.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author

# Interfaces

Leader is an interface used by return values on things that can elect a leader.
Lock is an interface used by return values on things that can achieve a lock.
Reservation will reserve an item given an id.