You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
wip
This commit is contained in:
@@ -1,25 +1,31 @@
|
||||
// import { RedisCommandArguments } from '.';
|
||||
import { SimpleStringReply, Command, BlobStringReply } from '../RESP/types';
|
||||
|
||||
// export type EventType =
|
||||
// 'active-defrag-cycle'
|
||||
// | 'aof-fsync-always'
|
||||
// | 'aof-stat'
|
||||
// | 'aof-rewrite-diff-write'
|
||||
// | 'aof-rename'
|
||||
// | 'aof-write'
|
||||
// | 'aof-write-active-child'
|
||||
// | 'aof-write-alone'
|
||||
// | 'aof-write-pending-fsync'
|
||||
// | 'command'
|
||||
// | 'expire-cycle'
|
||||
// | 'eviction-cycle'
|
||||
// | 'eviction-del'
|
||||
// | 'fast-command'
|
||||
// | 'fork'
|
||||
// | 'rdb-unlink-temp-file';
|
||||
export const LATENCY_EVENTS = {
|
||||
ACTIVE_DEFRAG_CYCLE: 'active-defrag-cycle',
|
||||
AOF_FSYNC_ALWAYS: 'aof-fsync-always',
|
||||
AOF_STAT: 'aof-stat',
|
||||
AOF_REWRITE_DIFF_WRITE: 'aof-rewrite-diff-write',
|
||||
AOF_RENAME: 'aof-rename',
|
||||
AOF_WRITE: 'aof-write',
|
||||
AOF_WRITE_ACTIVE_CHILD: 'aof-write-active-child',
|
||||
AOF_WRITE_ALONE: 'aof-write-alone',
|
||||
AOF_WRITE_PENDING_FSYNC: 'aof-write-pending-fsync',
|
||||
COMMAND: 'command',
|
||||
EXPIRE_CYCLE: 'expire-cycle',
|
||||
EVICTION_CYCLE: 'eviction-cycle',
|
||||
EVICTION_DEL: 'eviction-del',
|
||||
FAST_COMMAND: 'fast-command',
|
||||
FORK: 'fork',
|
||||
RDB_UNLINK_TEMP_FILE: 'rdb-unlink-temp-file'
|
||||
} as const;
|
||||
|
||||
// export function transformArguments(event: EventType): RedisCommandArguments {
|
||||
// return ['LATENCY', 'GRAPH', event];
|
||||
// }
|
||||
export type LatencyEvent = typeof LATENCY_EVENTS[keyof typeof LATENCY_EVENTS];
|
||||
|
||||
// export declare function transformReply(): string;
|
||||
export default {
|
||||
FIRST_KEY_INDEX: undefined,
|
||||
IS_READ_ONLY: true,
|
||||
transformArguments(event: LatencyEvent) {
|
||||
return ['LATENCY', 'GRAPH', event];
|
||||
},
|
||||
transformReply: undefined as unknown as () => BlobStringReply
|
||||
} as const satisfies Command;
|
||||
|
Reference in New Issue
Block a user