mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-14 03:32:06 +00:00
17 lines
389 B
JavaScript
17 lines
389 B
JavaScript
class RedisClusterClient {
|
|
constructor(frontendPool) {
|
|
this.frontendPool = frontendPool;
|
|
}
|
|
|
|
getSocketConfig(channel) {
|
|
return this.frontendPool.getFrontends(channel).then(result => {
|
|
if (!Array.isArray(result)) {
|
|
result = [];
|
|
}
|
|
|
|
return { servers: result };
|
|
});
|
|
}
|
|
}
|
|
|
|
export { RedisClusterClient };
|