Versions in this module Expand all Collapse all v0 v0.1.0 Aug 17, 2026 Changes in this version + var ErrEmptyKey = errors.New("lock: key must not be empty") + var ErrInvalidTTL = errors.New("lock: ttl must be greater than zero") + var ErrNotHeld = errors.New("lock: not held") + var ErrNotObtained = errors.New("lock: not obtained") + func NewToken() (string, error) + func ResolveValue(opts *Options) (string, error) + type Locker interface + Lock func(ctx context.Context) error + Refresh func(ctx context.Context) error + TryLock func(ctx context.Context) error + Unlock func(ctx context.Context) error + type Option func(*Options) + func WithRetryDelay(d time.Duration) Option + func WithTTL(ttl time.Duration) Option + func WithValue(v string) Option + type Options struct + RetryDelay time.Duration + TTL time.Duration + Value string + func ApplyOptions(opts ...Option) Options