Behaviour for background-task storage backends.
FastestMCP keeps task execution orchestration in FastestMCP.BackgroundTaskStore
and delegates storage concerns to a backend. The split is intentional:
BackgroundTaskStore
-> owns process coordination, waiters, and EventBus emission
-> asks TaskBackend to persist, fetch, paginate, and expire task stateThat keeps the current OTP runtime simple while making room for ETS-backed or distributed implementations without changing the public task API.
Summary
Types
Callbacks
@callback list_tasks(store :: store_ref(), opts :: keyword()) :: {:ok, list_result()} | {:error, term()}
@callback start_link(opts :: keyword()) :: GenServer.on_start()