-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.d.ts
30 lines (26 loc) · 1011 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export declare class StreamChannelBroker {
constructor(redisClient: any, channelName: string);
publish(payload: any, maximumApproximateMessages?: number, failOnMaxMessageCount?: boolean): Promise<string>;
destroy(): Promise<boolean>;
joinConsumerGroup(groupName: string, readFrom: string): Promise<ConsumerGroup>;
memoryFootprint(): Promise<number>;
}
declare class ConsumerGroup {
name: string;
readFrom: string;
subscribe(consumerName: string, handler: (payload: Payload[]) => Promise<number>, pollSpan?: number, payloadsToFetch?: number, subscriptionHandle?: string, readPending?: boolean): Promise<string>;
unsubscribe(subscriptionHandle: string): Promise<boolean>;
pendingSummary(): Promise<GroupSummary>;
}
declare class Payload {
channel: string;
id: string;
payload: any;
markAsRead(deleteMessage?: boolean): Promise<boolean>;
}
declare class GroupSummary {
total: number;
firstId: string;
lastId: string;
consumerStats: any;
}