Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RedisGears

Hierarchy

  • Module
    • RedisGears

Index

Constructors

  • new RedisGears(clusterNodes: ClusterNode[], moduleOptions?: RedisModuleOptions, clusterOptions?: ClusterOptions): RedisGears
  • new RedisGears(redisOptions: RedisOptions, moduleOptions?: RedisModuleOptions): RedisGears
  • Initializing the module object

    Parameters

    • clusterNodes: ClusterNode[]

      The nodes of the cluster

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    • Optional clusterOptions: ClusterOptions

      The options of the clusters

    Returns RedisGears

  • Initializing the module object

    Parameters

    • redisOptions: RedisOptions

      The options of the redis database

    • Optional moduleOptions: RedisModuleOptions

      The additional module options

    Returns RedisGears

Properties

cluster: Cluster
clusterNodes: ClusterNode[]
clusterOptions: ClusterOptions
gearsCommander: GearsCommander = ...
isHandleError: boolean
name: string
redis: Redis
redisOptions: RedisOptions
returnRawResponse: boolean
showDebugLogs: boolean

Methods

  • abortExecution(id: string): Promise<"OK">
  • configGet(key: string[]): Promise<number>
  • configSet(keyvalues: string[][]): Promise<"OK"[]>
  • connect(): Promise<void>
  • Connecting to the Redis database with the module

    Returns Promise<void>

  • disconnect(): Promise<void>
  • Disconnecting from the Redis database with the module

    Returns Promise<void>

  • dropExecution(id: string): Promise<"OK">
  • dumpExecutions(): Promise<string[][]>
  • dumpRegistrations(): Promise<string[][]>
  • getResults(id: string): Promise<string>
  • getResultsBlocking(id: string): Promise<string>
  • Retrieving the results that have 'UNBLOCKING' argument (And removing it)

    Parameters

    • id: string

      The id of the execution

    Returns Promise<string>

  • handleError(error: string): any
  • Handling a error

    Parameters

    • error: string

      The message of the error

    Returns any

  • handleResponse(response: any): any
  • Simpilizing the response of the Module command

    Parameters

    • response: any

      The array response from the module

    Returns any

  • infocluster(): Promise<string[]>
  • isOnlyTwoDimensionalArray(array: any[]): boolean
  • Check if array is fully two dimensional. Only items in the array are arrays.

    Parameters

    • array: any[]

      The potential two dimensional array

    Returns boolean

  • paramToString(paramValue: string): string
  • Formatting given param value to string

    Parameters

    • paramValue: string

      The given param value

    Returns string

    A param value converted to string

  • pydumpreqs(): Promise<string[]>
  • pystats(): Promise<string[]>
  • reduceArrayDimension(array: any[][]): any[]
  • Reducing an array by one level. i.e. from two dimensional to 1 dimensional.

    Parameters

    • array: any[][]

      The potentional two dimensional array

    Returns any[]

  • refreshCluster(): Promise<"OK">
  • sendCommand(data: CommandData): Promise<any>
  • Running a Redis command

    Parameters

    • data: CommandData

      The command data of a command to send. Consists of command and args.

    Returns Promise<any>

  • trigger(trigger: string, args: string[]): Promise<string[]>
  • Triggering the execution of a registered 'CommandReader' function

    Parameters

    • trigger: string

      The trigger's name

    • args: string[]

      The additional arguments

    Returns Promise<string[]>

  • unregister(id: string): Promise<"OK">

Generated using TypeDoc