IzumiSy/elm-consistent-hashing/2.0.0

NOTE: the latest version is 4.0.1

elm-consistent-hashing

CircleCI

A pure Elm consistent hashing module

Example

import ConsistentHashing as ConsistentHashing
import ConsistentHashing.Node as Node
import ConsistentHashing.Replica as Replica



-- model


type alias Model =
    { ch : ConsistentHashing }


-- init


init : Model
init =
    { ch =
        ConsistentHashing.new
            Replica.default
            [ Node.new "node1"
            , Node.new "node2"
            , Node.new "node3"
            , Node.new "node4"
            ]
    }

License

MIT

Contribution

PRs accepted