sonyflake v0.1.0
sonyflake
A Crystal port of sony/sonyflake
Installation
- Add the dependency to your
shard.yml
:
dependencies:
sonyflake:
github: BecauseOfProg/sonyflake
- Run
shards install
Usage
require "sonyflake"
settings = Sonyflake::Settings.new(start_time: Time.utc(2020, 1, 1), machine_id: 1)
sonyflake = Sonyflake.new_sonyflake(settings)
puts sonyflake.next_id # => 302603879411875841
puts Sonyflake.get_instance.next_id # => 302603879411941377
Contributing
- Fork it (https://github.com/BecauseOfProg/sonyflake/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Whaxion - creator and maintainer
Repository
sonyflake
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- over 4 years ago
- May 19, 2020
License
MIT License
Links
Synced at
Wed, 06 Nov 2024 15:33:38 GMT
Languages