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 270 B

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