1
0
mirror of synced 2026-02-25 22:37:59 +08:00

auto commit

This commit is contained in:
yitter
2022-09-08 11:07:12 +08:00
parent a45b38cbf9
commit fe22bfb7e2
5 changed files with 9 additions and 8 deletions

View File

@@ -5,7 +5,7 @@
第1步**全局** 初始化(应用程序启动时执行一次):
```
// 创建 IdGeneratorOptions 对象,可在构造函数中输入 WorkerId
let mut options = IdGeneratorOptions::New(Your_Worker_Id);
let mut options = IdGeneratorOptions::New(Your_Unique_Worker_Id);
// options.WorkerIdBitLength = 10; // 默认值6限定 WorkerId 最大值为2^6-1即默认最多支持64个节点。
// options.SeqBitLength = 6; // 默认值6限制每毫秒生成的ID个数。若生成速度超过5万个/秒,建议加大 SeqBitLength 到 10。
// options.BaseTime = Your_Base_Time; // 如果要兼容老系统的雪花算法此处应设置为老系统的BaseTime。