An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/mustafaturan/monoton

Package monoton is a highly scalable, single/multi node, human-readable, predictable and incremental unique id generator The monoton package provides sequences based on the monotonic time which represents the absolute elapsed wall-clock time since some arbitrary, fixed point in the past. It isn't affected by changes in the system time-of-day clock. Initial time value opens space for the time value by subtracting the given value from the time sequence. The monoton package converts all sequences into Base62 format. And Base62 only uses ASCII alpha-numeric chars to represent data which makes it easy to read, predict the order by a human eye. The total byte size is fixed to 16 bytes for all sequencers. And at least one byte is reserved to nodes. The monoton package can be used on single/multiple nodes without the need for machine coordination. It uses configured node identifier to generate ids by attaching the node identifier to the end of the sequences. The package comes with three pre-configured sequencers and Sequencer interface to allow new sequencers. The monoton package currently comes with Nanosecond, Millisecond and Second sequencers. And it uses Millisecond sequencer by default. For each sequencer, the byte orders are as following: The sequencers can be extended for any other time format, sequence format by implementing the monoton/sequncer.Sequencer interface. Example using Singleton
9 versions
Latest release: over 5 years ago
33 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/mustafaturan/monoton

Dependent Repos 0