1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-06-21 19:09:45 -04:00
parent 4894c26458
commit b46f08228c
53 changed files with 831 additions and 630 deletions

View File

@@ -3,7 +3,7 @@ import { ArrayReply, BlobStringReply, Command, NumberReply } from '../RESP/types
type MasterRole = [
role: BlobStringReply<'master'>,
replicationOffest: NumberReply,
replicas: ArrayReply<[host: BlobStringReply, port: NumberReply, replicationOffest: NumberReply]>,
replicas: ArrayReply<[host: BlobStringReply, port: BlobStringReply, replicationOffest: BlobStringReply]>
];
type SlaveRole = [
@@ -36,8 +36,8 @@ export default {
replicationOffest,
replicas: replicas.map(([host, port, replicationOffest]) => ({
host,
port,
replicationOffest,
port: Number(port),
replicationOffest: Number(replicationOffest)
})),
};
}
@@ -48,7 +48,7 @@ export default {
role,
master: {
host: masterHost,
port: masterPort,
port: masterPort
},
state,
dataReceived,
@@ -59,7 +59,7 @@ export default {
const [role, masterNames] = reply as SentinelRole;
return {
role,
masterNames,
masterNames
};
}
}