mem_macula (macula_testkit v0.1.0)
View SourceIn-memory macula loopback: stand up an N-node mesh whose pools are drop-in replacements for real macula pools.
{ok, #{pools := [A, B]}} = mem_macula:cluster(2), {ok, _} = macula:subscribe(B, Realm, Topic, self()), ok = macula:publish(A, Realm, Topic, Fact), %% self() receives {macula_event, _, Topic, Fact, _}
No QUIC, no station, no certificates.
Summary
Functions
A mesh plus N pools bound to it. Returns the mesh and the pools.
A fresh pool bound to an existing mesh.
Functions
-spec cluster(pos_integer()) -> {ok, #{mesh := pid(), pools := [pid()]}}.
A mesh plus N pools bound to it. Returns the mesh and the pools.
A fresh pool bound to an existing mesh.
-spec start_mesh() -> {ok, pid()}.