Cauldron2D.Ledger.Recorder (Cauldron2D v0.1.3)

Copy Markdown View Source

One arena's scribe: subscribed to its world's events (Cauldron2D.World.Events), it puts every {tag, row}:result unless told otherwise — in the ledger under the arena's name. It stops when the world does.

Cauldron2D.Ledger.Recorder.start_link(world: world, arena: "Pit", ledger: Cauldron2D.Ledger)

Options

  • :world — the world to record. Required
  • :arena — the name results are kept under. Required
  • :ledger — the ledger. Default Cauldron2D.Ledger
  • :tag — the events to keep. Default :result
  • :on_result — a function given each row after it is kept. Default none

Summary

Functions

Returns a specification to start this module under a supervisor.

Start recording; see the module documentation for the options.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()

Start recording; see the module documentation for the options.