AshReplicant.Sink (AshReplicant v0.2.0)

Copy Markdown View Source

Generates a Replicant.Sink implementation bound to a host's config.

defmodule MyApp.ReplicantSink do
  use AshReplicant.Sink,
    repo: MyApp.Repo,
    domains: [MyApp.Shop],
    checkpoint_resource: MyApp.ReplicantCheckpoint,
    slot_name: "shop_orders"
end

Replicant.Sink callbacks carry no pipeline context, so config is baked into the generated module. The resolver index is built by AshReplicant.start_link/1 and read from :persistent_term.