Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 7.9% on proxy.golang.org
Top 5.8% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org

proxy.golang.org : github.com/mustafaturan/monoton/v3

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

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/mustafaturan/monoton/v3
Keywords: go, golang, golang-library, golang-package, id-generator, ksuid, snowflake, snowflake-alternative, zero-alloc, zero-allocation
License: Apache-2.0
Latest release: over 2 years ago
First release: over 2 years ago
Namespace: github.com/mustafaturan/monoton
Dependent packages: 1
Dependent repositories: 1
Stars: 24 on GitHub
Forks: 1 on GitHub
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/mustafaturan
Last synced: 6 days ago

    Loading...
    Readme
    Loading...