type Locker interface {
// Path return the path of the file used by this Locker instance Path() string// WithLock wait for the lock and then execute the given function WithLock(cb func() error) error
}
type Options struct {
RetryInterval time.Duration// RetryInterval how often to retry lock attempts (default 100ms) Timeout time.Duration// Timeout how long to wait for the lock before giving up (default 5s)}
Options holds necessary attributes for a file lock with a timeout.