package
0.0.0-20220215024344-e6d77e20f5fb
Repository: https://github.com/huangjunwen/golibs.git
Documentation: pkg.go.dev

# Functions

WithLock is equivalent to WithLockOpts() with opts == nil.
WithLockOpts try to get/hold a MySQL lock (GET_LOCK) and run a callback, until context done or connection lost.

# Variables

LockNotAcquired is returned when lock is held by other already.
LockOptDefaultCooldownInterval is the default value of LockOptions.CooldownInterval.
LockOptDefaultLogger is the default value of LockOptions.Logger.
LockOptDefaultPingInterval is the default value of LockOptions.PingInterval.

# Structs

LockOptions is options used in WithLockOpts.