An in-memory Ankusa.Intake for tests, benches and the fleet drill's fake. Not
a production mode: its "replicas" are one process.
Options (intake.memory): path (a file every record is appended to and the
log is reloaded from at start, so a replacement node started on an empty data
directory finds the log of the node it replaces) and latency_ms (every
confirm is delayed by it).
Faults are injected per call, by instance, from a test:
fail(instance, class, count)— the nextcountpublishes answer{:error, class}and store nothinglost_ack(instance, class, count)— the nextcountpublishes store the batch and answer{:error, class}(a timeout the broker completed)hold(instance)/release(instance)— publishes wait, unansweredhold_replay(instance)/release_replay(instance)— replay waitsset_latency/2,set_ready/2,set_verify/2,set_earliest/2put_raw(instance, record)— a record as it would sit in the log
records/1 reads the log back.
Summary
Functions
Returns a specification to start this module under a supervisor.
The next count publishes (default: all) fail with class and store nothing.
Clears every injected publish fault.
The next count publishes store the batch and answer class: a lost ack.
How many publish calls the log has seen (confirmed or not).
A record exactly as it sits in the log (a test of unknown kinds and versions).
Every record of the log, in position order.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
The next count publishes (default: all) fail with class and store nothing.
Clears every injected publish fault.
The next count publishes store the batch and answer class: a lost ack.
How many publish calls the log has seen (confirmed or not).
A record exactly as it sits in the log (a test of unknown kinds and versions).
Every record of the log, in position order.