erbloom
Safe and Fast Bloom Filter for Erlang
Without docker you must install erlang 20.1 and rust 1.23 on your machine. After you can run these goals:
release:
rebar3 as prod release
test:
rebar3 as test ct
In Docker enviroment:
make build_imgs
- build docker imagesmake up
- run sandboxmake down
- terminate sandboxmake tests
- run testsmake lint
- lintermake xref
- xref analysismake prod
- generate release for target
Using as a lib
- Add deps in rebar.conf:
{deps, [
{erbloom, ".*", {git, "https://github.com/Vonmo/erbloom.git", {tag, "1.0.0"}}}
]}
- Now you can create a new filter instance:
{ok, Filter} = bloom:new(9585059,1000000).
- Set a new element
bloom:set(Filter, "somekey").
- Check up element
bloom:check(Filter, "anotherkey").
- Serialize
bloom:serialize(Filter).
- Deserialize
bloom:deserialize(Filter).