4 releases

0.1.3 Feb 22, 2024
0.1.2 Jul 17, 2023
0.1.1 Mar 25, 2022
0.1.0 Mar 11, 2022

#548 in Algorithms

Download history 159/week @ 2024-02-19 37/week @ 2024-02-26 15/week @ 2024-03-04 18/week @ 2024-03-11 11/week @ 2024-03-18 15/week @ 2024-03-25 58/week @ 2024-04-01

105 downloads per month
Used in 3 crates

MIT/Apache

5KB
84 lines

pi_guid

全局唯一ID, 128位

{节点启动后的运行时间(纳秒ns)(8字节-584.9年),节点启动时间(单位s)(4字节-136年),节点编号(2字节),控制编号(2字节)}

同一个GuidGen分配的guid,保证time不重复

分布式系统可以利用控制编号来管理hash,进行一致hash命中


lib.rs:

全局唯一ID, 128位 {节点启动后的运行时间(纳秒ns)(8字节-584.9年),节点启动时间(单位s)(4字节-136年),节点编号(2字节),控制编号(2字节)} 同一个GuidGen分配的guid,保证time不重复

分布式系统可以利用控制编号来管理hash,进行一致hash命中

Dependencies

~0.3–2.2MB
~45K SLoC