-
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathclient.ts
More file actions
41 lines (37 loc) · 897 Bytes
/
client.ts
File metadata and controls
41 lines (37 loc) · 897 Bytes
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
31
32
33
34
35
36
37
38
39
40
41
import type { Connection, SendCommandOptions } from "./connection.ts";
import type { RedisReply, RedisValue } from "./protocol/shared/types.ts";
import type {
DefaultPubSubMessageType,
PubSubMessageType,
RedisSubscription,
SubscribeCommand,
} from "./subscription.ts";
/**
* A low-level client for Redis.
*/
export interface Client {
/**
* @deprecated
*/
readonly connection: Connection;
/**
* @deprecated
*/
exec(
command: string,
...args: RedisValue[]
): Promise<RedisReply>;
sendCommand(
command: string,
args?: RedisValue[],
options?: SendCommandOptions,
): Promise<RedisReply>;
subscribe<TMessage extends PubSubMessageType = DefaultPubSubMessageType>(
command: SubscribeCommand,
...channelsOrPatterns: Array<string>
): Promise<RedisSubscription<TMessage>>;
/**
* Closes a redis connection.
*/
close(): void;
}