Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace redis

Index

Functions

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

    Type Parameters

    • T

    Parameters

    • method: string
    • args: any[] = []
    • Optional connectionId: string
    • waitForResponse: boolean = false

    Returns Promise<T extends any ? T : unknown>

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

    ```js let payload = { messageType: 'myMessageType', serverId: api.id, serverToken: api.config.general.serverToken, message: 'hello!' }

    await api.redis.publish(payload)

    
    

    Parameters

    • payload: object | any[]

    Returns Promise<number>

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

Generated using TypeDoc