Options
All
  • Public
  • Public/Protected
  • All
Menu

Module distributed

Index

Functions

acquireLock

  • acquireLock(resource: string, duration: number): Promise<RedisLock | undefined>
  • Parameters

    • resource: string
    • duration: number

    Returns Promise<RedisLock | undefined>

    undefined if another node already has obtained the lock

broadcast

  • broadcast<T>(fn: Function): Promise<Function>
  • Type parameters

    • T

    Parameters

    • fn: Function

    Returns Promise<Function>

clearLock

  • clearLock(resource: string): Promise<boolean>
  • Parameters

    • resource: string

    Returns Promise<boolean>

    true if an existing lock was deleted

Generated using TypeDoc