You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

snowflake.py 295 B

12345678910111213141516171819202122
  1. """
  2. 雪花算法生成器接口声明
  3. """
  4. # !/usr/bin/python
  5. # coding=UTF-8
  6. # 组件编号生成器
  7. class SnowFlake():
  8. def __init__(self, options):
  9. self.options = options
  10. def next_id(self) -> int:
  11. """
  12. 获取新的UUID
  13. """
  14. return 0