Add RedisClusterClient

This commit is contained in:
calzoneman 2016-01-28 19:51:59 -08:00
parent f8470fc8f6
commit 86abebf9bf
2 changed files with 26 additions and 4 deletions

View file

@ -0,0 +1,17 @@
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 };