Versions in this module Expand all Collapse all v1 v1.0.0 Sep 8, 2026 Changes in this version + const DefaultConnWaitTimeout + type Config struct + ConnWaitTimeout time.Duration + Namespace int32 + func (cfg *Config) ValidateWithContext(_ context.Context) error + type Locker struct + func NewPostgresLocker(cfg *Config, db database.Client, cb circuitbreaking.CircuitBreaker, ...) (*Locker, error) + func (l *Locker) Acquire(ctx context.Context, key string, ttl time.Duration) (distributedlock.Lock, error) + func (l *Locker) Close() error + func (l *Locker) Ping(ctx context.Context) error + type Option func(*options) + func WithLogger(logger logging.Logger) Option + func WithMetricsProvider(metricsProvider metrics.Provider) Option + func WithTracerProvider(tracerProvider tracing.Provider) Option + type ScopedLocker struct + func NewPostgresScopedLocker(cfg *Config, db database.Client, cb circuitbreaking.CircuitBreaker, ...) (*ScopedLocker, error) + func (s *ScopedLocker) TryWithLock(ctx context.Context, key string, fn func(ctx context.Context) error) (bool, error) + func (s *ScopedLocker) WithLock(ctx context.Context, key string, fn func(ctx context.Context) error) error Other modules containing this package github.com/primandproper/primitives-go/v2