UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

18 lines (17 loc) 1.25 kB
import { KeyStoreParams, KeyType } from '../../../../modules/key'; import { ILogger } from '../../../logger'; import { SubService } from '../../index'; import { RedisRedisClientType as ClientProvider, RedisRedisMultiType as TransactionProvider } from '../../../../types/redis'; import { SubscriptionCallback } from '../../../../types/quorum'; declare class RedisSubService extends SubService<ClientProvider> { constructor(eventClient: ClientProvider, storeClient: ClientProvider); init(namespace: string, appId: string, engineId: string, logger: ILogger): Promise<void>; transact(): TransactionProvider; mintKey(type: KeyType, params: KeyStoreParams): string; subscribe(keyType: KeyType.QUORUM, callback: SubscriptionCallback, appId: string, engineId?: string): Promise<void>; unsubscribe(keyType: KeyType.QUORUM, appId: string, engineId?: string): Promise<void>; psubscribe(keyType: KeyType.QUORUM, callback: SubscriptionCallback, appId: string, engineId?: string): Promise<void>; punsubscribe(keyType: KeyType.QUORUM, appId: string, engineId?: string): Promise<void>; publish(keyType: KeyType.QUORUM, message: Record<string, any>, appId: string, engineId?: string): Promise<boolean>; } export { RedisSubService };