Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool implements a distlock.Locker backed by a pgxpool.Pool.
func NewPool ¶
NewPool returns a lock struct backed by the provided connection pool.
The returned lock can be reused
func (*Pool) Lock ¶
Lock attempts to take the lock identified by 'key', blocking and retrying on the period specified at creation until successful or the provided context is cancelled.
Click to show internal directories.
Click to hide internal directories.