mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-14 19:42:06 +00:00
18 lines
389 B
JavaScript
18 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 };
|