Options
All
  • Public
  • Public/Protected
  • All
Menu

Module redis

Index

Functions

doCluster

  • doCluster(method: string, args?: Array<any>, connectionId?: string, waitForResponse?: boolean): Promise<unknown>
  • Invoke a command on all servers in this cluster.

    Parameters

    • method: string
    • Default value args: Array<any> = []
    • Optional connectionId: string
    • Default value waitForResponse: boolean = false

    Returns Promise<unknown>

publish

  • publish(payload: object | Array<any>): Promise<number>
  • Publish a message to all other ActionHero nodes in the cluster. Will be authenticated against api.config.serverToken

    let payload = {
      messageType: 'myMessageType',
      serverId: api.id,
      serverToken: api.config.general.serverToken,
      message: 'hello!'
    }
    await api.redis.publish(payload)

    Parameters

    • payload: object | Array<any>

    Returns Promise<number>

respondCluster

  • respondCluster(messageId: string, response: PubSubMessage): Promise<void>

Generated using TypeDoc