Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Snowflake ¶
func NewSnowflake ¶
NewSnowflake redisObj: *redis.Client 已经实例化的redis链接对象 datacenterid: int64 workerid: int64
func (*Snowflake) GenerateBatch ¶
GenerateBatch 批量生成指定数量的ID nums: int 数量 prefix: string key前缀,用于区分不同场景用途的发号 return: []string 返回ID数组
Click to show internal directories.
Click to hide internal directories.