Versions in this module Expand all Collapse all v0 v0.1.0 Apr 5, 2023 v0.0.1 Apr 21, 2023 Changes in this version + type CtxMutex interface + Lock func(ctx context.Context) (err stackerr.Error) + TryLock func() (locked bool) + TryUnlock func() (unlocked bool) + Unlock func() + func NewCtxMutex() CtxMutex + type DistributedLock interface + Unlock func(ctx context.Context) (err stackerr.Error) + type DistributedLocker interface + GetActiveLocks func(ctx context.Context) (map[string]LockData, stackerr.Error) + GetAllLocks func(ctx context.Context) (map[string]LockData, stackerr.Error) + GetExpiredLocks func(ctx context.Context) (map[string]LockData, stackerr.Error) + Lock func(ctx context.Context, key string, metadata map[string]any) (newCtx context.Context, newLock DistributedLock, existingLock LockData, ...) + func NewDistributedLocker(ctx context.Context, dlConfig DistributedLockerConfig) (DistributedLocker, stackerr.Error) + type DistributedLockerConfig struct + AwsConfig *aws.Config + KeyColumn string + TableArn string + VersionColumn string + type LockData interface + Acquired func() time.Time + Active func() bool + Expires func() time.Time + Key func() string + LogsUrl func() string + Metadata func() map[string]json.RawMessage + Version func() string