sync/src/io/cluster/redisclusterclient.js
2016-01-28 19:51:59 -08:00

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 };