Skip to content

an implement of snowflake by go, use atomic instead of mutex

License

Notifications You must be signed in to change notification settings

fish-tennis/snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snowflake

Go Report Card Go Reference codecov

an implement of snowflake by go, use atomic instead of mutex

usage

workerId := uint16(123)
snowFlake := NewSnowFlake(workerId)
theUniqueId := snowFlake.NextId()

About

an implement of snowflake by go, use atomic instead of mutex

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages