Versions in this module Expand all Collapse all v2 v2.0.0 Aug 24, 2026 Changes in this version + const DefaultTTL + var ErrLockReleased = errors.New("locker: lock already released") + var ErrLocked = errors.New("locker: held by another session") + var ErrNameNoLeadingSlash = errors.New("locker: name must start with '/'") + var ErrNameTrailingSlash = errors.New("locker: name must not end with '/'") + var ErrPrefixNoLeadingSlash = errors.New("locker: prefix must start with '/'") + var ErrPrefixTrailingSlash = errors.New("locker: prefix must not end with '/'") + var ErrSessionExpired = errors.New("locker: session expired") + var ErrUnsupported = errors.New("locker: not supported by this driver instance") + func Do(ctx context.Context, f Factory, name string, fn func(context.Context) error, ...) error + func ValidateName(name string) error + type Factory interface + NewLocker func(ctx context.Context, name string, opts ...Option) (Locker, error) + func Prefixed(prefix string, inner Factory) (Factory, error) + type FactoryFunc func(ctx context.Context, name string, opts ...Option) (Locker, error) + func (f FactoryFunc) NewLocker(ctx context.Context, name string, opts ...Option) (Locker, error) + type Locker interface + Done func() <-chan struct{} + Key func() string + Lock func(ctx context.Context) error + TryLock func(ctx context.Context) error + Unlock func(ctx context.Context) error + type Option func(*Options) + func WithTTL(d time.Duration) Option + type Options struct + TTL time.Duration + func ApplyOptions(opts []Option) Options Other modules containing this package github.com/tarantool/go-storage