mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
[ioredis] Add xadd definitions to support MAXLEN argument
This commit is contained in:
Vendored
+2
@@ -489,6 +489,8 @@ declare namespace IORedis {
|
||||
xack(key: KeyType, group: string, ...ids: string[]): any;
|
||||
|
||||
xadd(key: KeyType, id: string, ...args: string[]): any;
|
||||
xadd(key: KeyType, maxLenOption: 'MAXLEN' | 'maxlen', count: number, ...args: string[]): any;
|
||||
xadd(key: KeyType, maxLenOption: 'MAXLEN' | 'maxlen', approximate: '~', count: number, ...args: string[]): any;
|
||||
|
||||
xclaim(key: KeyType, group: string, consumer: string, minIdleTime: number, ...args: any[]): any;
|
||||
|
||||
|
||||
@@ -177,6 +177,8 @@ new Redis.Cluster([{
|
||||
|
||||
redis.xack('streamName', 'groupName', 'id');
|
||||
redis.xadd('streamName', '*', 'field', 'name');
|
||||
redis.xadd('streamName', 'MAXLEN', 100, '*', 'field', 'name');
|
||||
redis.xadd('streamName', 'MAXLEN', '~', 100, '*', 'field', 'name');
|
||||
redis.xclaim('streamName', 'groupName', 'consumerName', 3600000, 'id');
|
||||
redis.xdel('streamName', 'id');
|
||||
redis.xgroup('CREATE', 'streamName', 'groupName', '$');
|
||||
|
||||
Reference in New Issue
Block a user