rendezvous-hash
Version, currently 0.3.14 versions
- 0.3.1latestJan 31, 2020
- 0.2.2not indexedJan 31, 2020
- 0.2.1not indexedJan 31, 2020
- 0.2.0not indexedJan 31, 2020
github.com/caspiano/rendezvous-hash
Rendezvous hashing for crystal
2 stars
1 dependent
License: MIT
Installation
# Add this to your shard.yml
dependencies:
rendezvous-hash:
github: caspiano/rendezvous-hash
version: ~> 0.3.1Then run:
shards installshard.yml
- Crystal
0.32.1- License
- MIT
- Author
- Caspian Baska <caspianbaska@gmail.com>
Dependencies
Runtime Dependencies
- murmur3*github: aca-labs/murmur3, branch: master
Development Dependencies
- ameba~> 0.10.1github: crystal-ameba/amebadev
README
# rendezvous-hash
[](https://travis-ci.org/caspiano/rendezvous-hash)
Rendezvous hashing for crystal that utilises the [murmur3](https://github.com/kuende/murmur3) hashing algorithm.
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
rendezvous-hash:
github: caspiano/rendezvous-hash
```
2. Run `shards install`
## Usage
```crystal
require "rendezvous-hash"
hash = RendezvousHash.new(nodes: ["node1", "node2", "node3"])
hash.find("device1") # => "node3"
hash.remove("node3") # => "node3"
hash.nodes # => ["node1", "node2"]
hash.find("device1") # => "node1"
hash.remove?("node3") # => nil
hash.add("node3") # => ["node1", "node2", "node3"]
hash.find("device1") # => "node3"
hash["device1"] # => "node3"
```
## Credit
- [clandestined](https://github.com/ewdurbin/clandestined-ruby)
## Todo
- Benchmarking
- murmur3 seeding
## Contributing
1. [Fork it](https://github.com/caspiano/rendezvous-hash/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Caspian Baska](https://github.com/caspiano) - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.3.1- Tagged
- Jan 31, 2020
- Commit
ce3690f6a9d1- Crystal
0.32.1- Indexed
- yes
Dependents
Repository
github.com/caspiano/rendezvous-hash
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 4