import { Cluster, Redis, RedisOptions } from 'ioredis'; import { Static, TSchema } from '@sidewinder/type'; import { SyncSender } from '@sidewinder/channel'; export declare class RedisSenderError extends Error { constructor(message: string); } /** Redis Sender. This type uses multi sender, single receiver semantics. */ export declare class RedisSender implements SyncSender> { #private; private readonly schema; private readonly channel; private readonly redis; constructor(schema: T, channel: string, redis: Cluster | Redis); /** Sends a value to this sender */ send(value: Static): Promise; /** Sends an error to this sender and closes. Note that redis channels do not transmit the error. */ error(error: Error): Promise; /** Ends this sender and closes */ end(): Promise; private encodeKey; /** Creates a RedisSender with the given parameters */ static Create(schema: T, channel: string, port?: number, host?: string, options?: RedisOptions): Promise>; /** Creates a RedisSender with the given parameters */ static Create(schema: T, channel: string, host?: string, options?: RedisOptions): Promise>; /** Creates a RedisSender with the given parameters */ static Create(schema: T, channel: string, options: RedisOptions): Promise>; }