DoubleEntryLedger (double_entry_ledger v0.4.0)

View Source

Entry point for the DoubleEntryLedger library.

Most functionality lives under DoubleEntryLedger.Apis.* and DoubleEntryLedger.Stores.*. This module exposes the integration helpers consumers need when embedding the library.

Summary

Functions

Child specs to add to a consumer application's supervisor in BYO-repo mode.

Functions

children()

@spec children() :: [Supervisor.child_spec() | {module(), term()} | module()]

Child specs to add to a consumer application's supervisor in BYO-repo mode.

Place this after the consumer's repo so Oban and the command queue see a started repo:

# lib/my_app/application.ex
children = [
  MyApp.Repo,
  # ... other children ...
] ++ DoubleEntryLedger.children()

In standalone mode (no :repo configured) the library supervises these itself and consumers do not need to call this.