Interface ILockStore

Lock Store API

interface ILockStore {
    release(id, eid): Promise<boolean>;
    tryAcquire(id, eid, expiry?): Promise<boolean>;
}

Implemented by

Methods

  • Release a lock.

    Parameters

    • id: string

      Id of lock.

    • eid: string

      Execution id of lock.

    Returns Promise<boolean>

  • Try to acquire a lock.

    Parameters

    • id: string

      Id of lock.

    • eid: string

      Execution id of lock.

    • Optional expiry: number

      Time in ms before lock will expire.

    Returns Promise<boolean>

    A boolean indicating whether or not the lock was acquired.