Versions in this module Expand all Collapse all v1 v1.0.2 Aug 14, 2024 Changes in this version + const LeaseSeconds + func IsLockingFailed(err error) bool + type Lock struct + func (l *Lock) Active() bool + func (l *Lock) Ctx() context.Context + func (l *Lock) Name() string + func (l *Lock) Release() bool + type Locker struct + Logger *slog.Logger + func New(db *ent.Client, leaseSeconds int64) *Locker + func (l *Locker) TryAcquire(pctx context.Context, id string, heartbeatSeconds int64) (*Lock, error) v1.0.1 Aug 14, 2024