Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnowflakeService

A tool/microservice to centrally generate snowflake IDs.

GitHub License GitHub Issues or Pull Requests GitHub repo size GitHub Release

Acknowledgements

This utility uses:

Installation

Docker (Recommended)

  docker pull bootmediaalix/snowflakeservice
  docker run -e %{set required .env, see below} -p 9567:9567 -v %{desired path on host}:/data/b00tload-tools/snowflake bootmediaalix/snowflakeservice

Containerless

A containerless installation is possible, although not supported. For development convenience the application base directory is located in ~/.b00tload-tools/snowflake instead of /data/b00tload-tools/snowflake. If you want to work containerless you are on your own.

Environment Variables

To run this project, you may add the following environment variables to your .env file

EPOCH - the starting time of the snowflake (defaults to 01.01.2024 12:00 AM)

MACHINE_ID_BITS - the amount of bits used for the machine ID

SEQUENCE_BITS - the amount of bits used for the sequence counter

MACHINE_ID - the ID of the generator

API Reference

Get an ID

  GET /generate

Response example:

{
  "id": "50990430426234880"
}

Maintainer

License

GNU GPL v3

Support

For support, open a ticket or email me at alix (at) ja-lol-ey (dot) de.

About

A tool/microservice to centrally generate snowflake IDs. Can be run in a distributed system.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages