1
0
mirror of synced 2026-02-23 21:37:56 +08:00

auto commit

This commit is contained in:
yitter
2021-04-04 12:28:14 +08:00
parent 276485b612
commit 0180a14ba9

View File

@@ -136,8 +136,9 @@ SeqBitLength = 6
### 长度估算
```
💍 每增加 1位 WorkerIdBitLength 或 SeqBitLength生成的ID数字值将会乘以2基础长度可参考前“ID示例”反之则除以2。
```
### 能用多久
@@ -174,7 +175,6 @@ SeqBitLength = 6
🔍 本算法提供一个开源的动态库go语言实现能在容器 k8s或其它容器化集群 环境下,通过 redis 自动注册 WorkerId。动态库提供的C接口方法有
```
// 注册一个新的WorkerId
extern __declspec(dllexport) GoInt RegisterWorkerId(char* ip, GoInt port, char* password, GoInt maxWorkerId);
@@ -183,7 +183,6 @@ extern __declspec(dllexport) void UnRegisterWorkerId();
// 检查本地WorkerId是否有效
extern __declspec(dllexport) GoUint8 ValidateLocalWorkerId(GoInt workerId);
```
#### redis作用