feat(redis): support MONITOR live command log
This commit is contained in:
25 files changed
+439
-7
No files matched your search
@@ -2989,8 +2989,8 @@ export async function redisPubSubPublish(connectionId: string, db: number, chann
|
||||
});
|
||||
}
|
||||
|
||||
export async function redisPubSubConnect(connectionId: string): Promise<WebSocket> {
|
||||
return new WebSocket(apiWebSocketUrl(`/api/redis/pubsub/ws?connectionId=${encodeURIComponent(connectionId)}`));
|
||||
export async function redisPubSubConnect(connectionId: string, monitor = false): Promise<WebSocket> {
|
||||
return new WebSocket(apiWebSocketUrl(`/api/redis/pubsub/ws?connectionId=${encodeURIComponent(connectionId)}&monitor=${monitor}`));
|
||||
}
|
||||
|
||||
export async function redisSlowlogGet(connectionId: string, count: number, nodeHost?: string, nodePort?: number): Promise<RedisSlowlogEntry[]> {
|
||||
|
||||
@@ -2926,9 +2926,9 @@ export async function redisPubSubPublish(connectionId: string, db: number, chann
|
||||
return invoke("redis_pubsub_publish", { connectionId, db, channel, message });
|
||||
}
|
||||
|
||||
export async function redisPubSubConnect(connectionId: string): Promise<WebSocket> {
|
||||
export async function redisPubSubConnect(connectionId: string, monitor = false): Promise<WebSocket> {
|
||||
const port = await invoke<number>("redis_pubsub_server_port");
|
||||
return new WebSocket(`ws://127.0.0.1:${port}/api/redis/pubsub/ws?connectionId=${encodeURIComponent(connectionId)}`);
|
||||
return new WebSocket(`ws://127.0.0.1:${port}/api/redis/pubsub/ws?connectionId=${encodeURIComponent(connectionId)}&monitor=${monitor}`);
|
||||
}
|
||||
|
||||
export async function redisSlowlogGet(connectionId: string, count: number, nodeHost?: string, nodePort?: number): Promise<RedisSlowlogEntry[]> {
|
||||
|
||||
Reference in new issue
Block a user