ETS-backed task store implementation.
Uses a named ETS table for storage. The store reference is the table name atom. Suitable for single-node, concurrent access.
Push notification configs are kept in a second table, :"#{name}_push",
created alongside the first. They cannot share the task table: list/2 and
list_all/2 scan every row and treat it as a task, so a config row would
crash both.
Usage
{:ok, _pid} = A2A.TaskStore.ETS.start_link(name: :my_tasks)
:ok = A2A.TaskStore.ETS.put(:my_tasks, task)
{:ok, task} = A2A.TaskStore.ETS.get(:my_tasks, "tsk-abc123")With an Agent
MyAgent.start_link(task_store: {A2A.TaskStore.ETS, :my_tasks})
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the ETS task store process which creates the underlying table.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the ETS task store process which creates the underlying table.
Options
:name— the table/process name (required)