@squidcloud/backend
    Preparing search index...

    Function secureDistributedLock

    • A decorator that can be used to secure a distributed lock. Distributed locks are secured by default and can be invoked only if the decorated function allows it. The function returns a boolean or a Promise of a boolean that indicates whether the lock can be acquired or not.

      The function accepts a context object as a parameter. The context object contains information about the mutex and the request.

      Parameters

      • Optionalmutex: string

        The mutex to lock on. If none provided, the rule will apply for all mutexes.

      Returns ActionMethodDecorator<SecureDistributedLockAction>