Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisId ¶
type RedisId struct {
// contains filtered or unexported fields
}
RedisId redis生成自增id
type SnowflakeId ¶
type SnowflakeId struct {
// contains filtered or unexported fields
}
func NewIdWorker ¶
func NewIdWorker(machineId uint16) SnowflakeId
func (SnowflakeId) NextId ¶
func (w SnowflakeId) NextId() (uint64, error)
Click to show internal directories.
Click to hide internal directories.