ADK.Session.Store.JsonFile (ADK v0.0.1)

Copy Markdown View Source

File-based JSON session store.

Stores each session as a JSON file at: {base_path}/{app_name}/{user_id}/{session_id}.json

Good for development and simple deployments.

Usage

ADK.Session.start_link(
  app_name: "my_app",
  user_id: "user1",
  session_id: "sess1",
  store: {ADK.Session.Store.JsonFile, [base_path: "/tmp/sessions"]}
)

Summary

Functions

List all sessions across all apps and users. Returns {:ok, [%{id: ..., app_name: ..., user_id: ...}]}.

Functions

list_all(opts \\ [])

@spec list_all(keyword()) :: {:ok, [map()]} | {:error, term()}

List all sessions across all apps and users. Returns {:ok, [%{id: ..., app_name: ..., user_id: ...}]}.

Used by ADK.Session.Recovery to find sessions to restore after restart.