ExAgent.Memory.ETS (ExAgent v3.0.0)

View Source

An in-memory ExAgent.Memory backend, per node.

Stability — Stable.

A GenServer owns a protected named ETS table: reads go straight to the table and writes are serialized through the owner, which checks the expected version. Versions are opaque positive integers unique within this VM. A new owner of the same table name issues fresh versions. Contents are lost when the table's owner stops. The library starts a default table named ExAgent.Memory.ETS (:ets in ExAgent.Memory.tool/2); start more under your own supervisor:

children = [{ExAgent.Memory.ETS, name: MyApp.Memory}]

ExAgent.Memory.tool({ExAgent.Memory.ETS, MyApp.Memory}, scope: "team:7")

Summary

Functions

Build a child specification with ID {ExAgent.Memory.ETS, name}.

Start a linked owner and its memory table. The only option, :name, names both the local process and table, and defaults to this module.

Functions

child_spec(init_arg)

@spec child_spec(keyword()) :: Supervisor.child_spec()

Build a child specification with ID {ExAgent.Memory.ETS, name}.

start_link(opts \\ [])

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

Start a linked owner and its memory table. The only option, :name, names both the local process and table, and defaults to this module.