Documentation ¶
Overview ¶
Package mysqllock provides a distributed locking mechanism leveraging MySQL internal functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTimeout is an error when the lock is not acquired within the timeout. ErrTimeout = errors.New("acquire lock timeout") // ErrFailed is an error when the lock is not acquired. ErrFailed = errors.New("failed to acquire a lock") )
Functions ¶
This section is empty.
Types ¶
type MySQLLock ¶
type MySQLLock struct {
// contains filtered or unexported fields
}
MySQLLock represents a locker.
type ReleaseFunc ¶
type ReleaseFunc func() error
ReleaseFunc is an alias for a release lock function.
Click to show internal directories.
Click to hide internal directories.