kkrypt0nn / spaceflake Goto Github PK
View Code? Open in Web Editor NEW⛄ A distributed generator to create unique IDs with ease in Go; inspired by Twitter's Snowflake
Home Page: https://krypton.ninja
License: MIT License
⛄ A distributed generator to create unique IDs with ease in Go; inspired by Twitter's Snowflake
Home Page: https://krypton.ninja
License: MIT License
Generate lots Spaceflake IDs to, for example, feed a database or another dark reason.
There would be two ways of doing it:
(w *Worker) BulkGenerateSpaceflakes()
functionBulkeGenerateSpaceflakes(s GeneratorSettings)
functionBoth can be possible of course, like the entire library
Since we can only generate 4095 Spaceflakes per millisecond on a single worker there would be two options, each for the ways of doing above:
would u please setup a Sponsoring as one-time Sponsoring?
i love this repo, thanks a lot for great works.
Be able to generate a Spaceflake where the base
or timestamp of that Spaceflake can be customized. The argument would be of type Time
and can be created with time.Date
. It would contain two generators, one on a Worker
type and another one with GeneratorSettings
added as argument.
When using a worker
func (w *Worker) GenerateSpaceflakeAt(at time.Time) (*Spaceflake, error) {
// ...
}
Without using a worker
func GenerateAt(s GeneratorSettings, at time.Time) (*Spaceflake, error) {
// ...
}
rt.
thanks for great work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.