Documentation ¶
Index ¶
Constants ¶
View Source
const MachineBit = 53
MachineBit 机器码移位52
View Source
const TimestampBit = 12
TimestampBit 时间戳移位12
View Source
const WorkerBit = 10
WorkerBit 工作位数
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Snowflake ¶ added in v0.0.6
type Snowflake struct {
// contains filtered or unexported fields
}
Snowflake 首位0,workid占有10位,时间戳41位,自增占用12位 Snowflake 改进简化版雪花算法
func NewSnowflake ¶ added in v0.0.6
NewSnowflake http://www.manongjc.com/detail/29-fixpagcswacgpvg.html NewSnowflake seata改进型雪花算法分布式ID-java实现
func (*Snowflake) InfoString ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.