master
Bel LaPointe 2023-03-13 07:51:12 -06:00
commit 9b811d89f0
2 changed files with 18 additions and 0 deletions

15
README.md Normal file
View File

@ -0,0 +1,15 @@
# Snowflake UID Service
* (0..41] bits for .01s since $EPOCH (697y span)
* (41..54] bits for sequence (4096)
* (54..64] bits for hostid (1024 hosts)
for up to `419_430_400 = 1024*100*4096` ids per second
## Original
* source: https://github.com/twitter-archive/snowflake/tree/snowflake-2010
* tldr
* [0..41] bits for timestamp
* (41..x] bits for hostid
* (x..64) bits for sequence

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module snowflake-uid-service
go 1.20