Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWorkerID 无效的 workerID,取值范围 [0, maxWorkerID] ErrWorkerID = errors.New("bad worker id") // ErrTimeBackward 时间倒退,当前时间比上一次记录的时间还要小 ErrTimeBackward = errors.New("time backward") )
Functions ¶
Types ¶
type Snowflake ¶ added in v0.41.8
type Snowflake struct {
// contains filtered or unexported fields
}
Snowflake 用来生成 uuid 的工具
func NewSnowflake ¶ added in v0.41.8
NewSnowflake ..
Click to show internal directories.
Click to hide internal directories.