高性能雪花ID生成服务
新建docker-compose.yml配置文件,内容如下:
version: "3"
services:
hello_snowflake:
image: dreamplay/hello_snowflake
restart: always
ports:
- 8080:8080
docker-compose up -d
方法:GET
请求参数:
| 字段 | 是否必填 | 类型 | 描述 |
|---|---|---|---|
| worker_id | 否 | int | 机器ID,取值范围0-1023,默认0 |
返回示例:
{
"code": 200, //200-成功,其他-错误,查看错误信息message
"data": {
"id": 652956844595085312, //雪花ID
"worker_id": 0 //机器ID
},
"message": "创建成功"
}
Content type
Image
Digest
sha256:30589ed61…
Size
191.1 MB
Last updated
over 3 years ago
docker pull dreamplay/hello_snowflake