基于GO语言开源snowflake算法实现
提供HTTP接口
GITHUB地址: https://github.com/gitstliu/idservice
按照一下步骤运行
第一步
在配置文件中设置 ServicePort, WorkerId, DatacenterId
第二步
运行Main方法
第三步
用POST方法访问 http://{your_address}:{Port}/ids
注意
分布式部署的时候一定要配置不同的Datacenterid 或 WorkerId
基于GO语言开源snowflake算法实现
提供HTTP接口
GITHUB地址: https://github.com/gitstliu/idservice
按照一下步骤运行
在配置文件中设置 ServicePort, WorkerId, DatacenterId
运行Main方法
用POST方法访问 http://{your_address}:{Port}/ids
分布式部署的时候一定要配置不同的Datacenterid 或 WorkerId