IdGenerator
IdGenerator copied to clipboard
自动注册WorkerId的功能可以提供.net的实现样例吗
你可以用.net来调用动态库。有官方参考实例(C#):
[DllImport("workeridgo.dll", CallingConvention = CallingConvention.StdCall)]
private static extern int RegisterOne(string address, string password, int database, string sentinelMasterName, int minWorkerId, int maxWorkerId, int lifeTimeSeconds);
可以参考一下
https://github.com/LemonNoCry/SnowflakeId.AutoRegister