LemonCore.RunStore (lemon_core v0.1.0)

View Source

Typed wrapper for run lifecycle and history persistence.

Summary

Functions

append_event(run_id, event)

@spec append_event(term(), term()) :: :ok | {:error, term()}

delete_history(session_key)

@spec delete_history(term()) :: :ok

delete_session(session_key)

@spec delete_session(term()) :: :ok

delete_session_index(session_key)

@spec delete_session_index(term()) :: :ok

finalize(run_id, summary)

@spec finalize(term(), term()) :: :ok | {:error, term()}

get(run_id)

@spec get(binary()) :: term()

history(session_key, opts \\ [])

@spec history(
  term(),
  keyword()
) :: list()

list_sessions()

@spec list_sessions() :: [{term(), map()}]