//
pkg.gl
Category
github.com/tools-go/go-utils
lock
package
0.0.0-20240516065436-a2bc238b4b59
Repository:
https://github.com/tools-go/go-utils.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
5
Dependents
0
Files
127 SLOC
#
Packages
example
No description provided by the author
#
Functions
New
New will create a new Locker.
WithTTL
WithTTL configs the Locker with a timeout value, if the Locker cant get the lock when the ttl expiration, then Lock will fail.
#
Interfaces
Locker
Locker is an interface that have a trylock method.
#
Type aliases
Options
Options config Locker.
Unlocker
Unlocker is a func that can unlock the lock from the outside pkg.