lua 一致性哈希
基于 yaoweibin 的一致性哈希分支( )在 lua 中重新实现一致性哈希
用法
local chash = require " chash "
chash. add_upstream ( " 192.168.0.251 " )
chash. add_upstream ( " 192.168.0.252 " )
chash. add_upstream ( " 192.168.0.253 " )
local upstream = chash. get_upstream ( " my_hash_key " )
2022-02-08 18:47:40
2KB
Lua
1