implement nodeAddressMap for sentinel by elimelt · Pull Request #3145 · redis/node-redis

@elimelt

@PavelPashov mentioned this pull request

Dec 8, 2025

@elimelt

@elimelt elimelt marked this pull request as ready for review

December 8, 2025 21:09

nkaradzhov

@elimelt

Address PR review comments:
- Remove duplicate #getNodeAddress methods from RedisSentinelInternal and RedisSentinelFactory
- Add getMappedNode utility function in utils.ts that takes host, port, and nodeAddressMap
- Update all callsites to use the new utility function

This eliminates code duplication and makes the address mapping logic reusable.

nkaradzhov