PtcRunner.ViewerSnapshotStore (PtcRunner v0.15.0)

Copy Markdown View Source

Owner-bound captured view of one Viewer's trace and inspection snapshots.

The store captures both snapshots at start and serves Runs and analysis queries from that retained admission. viewer.private is not part of that immutability: every serving call re-reads the project document and, when its digest changed, reloads it. Revocation (true to false) drops the held InspectionSnapshot and the private-authorized trace snapshot inside the same handle_call and never serves from the discarded admission. Widening (false to true) and newly finished runs take effect only on refresh/1 or refresh/2, which recapture under the grant current at that moment.

Summary

Types

t()

@opaque t()

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

conversation(store, run_id)

@spec conversation(t(), binary()) :: {:ok, map()} | {:error, atom()}

execution_errors(store, run_id)

@spec execution_errors(t(), binary()) :: {:ok, map()} | {:error, atom()}

explicit_failure_values(store, run_id)

@spec explicit_failure_values(t(), binary()) :: {:ok, map()} | {:error, atom()}

generated_sources(store, run_id)

@spec generated_sources(t(), binary()) :: {:ok, map()} | {:error, atom()}

inspection?(store)

@spec inspection?(t()) :: boolean()

preludes(store, run_id)

@spec preludes(t(), binary()) :: {:ok, map()} | {:error, atom()}

query(store, operation, arguments)

@spec query(t(), atom(), map()) :: {:ok, map()} | {:error, atom()}

refresh(store)

@spec refresh(t()) :: :ok | {:error, atom()}

refresh(store, run_id)

@spec refresh(t(), binary()) :: :ok | {:error, atom()}

result(store, run_id)

@spec result(t(), binary()) :: {:ok, map()} | {:error, atom()}

start(trace_source, capture_inspection, opts \\ [])

@spec start(
  {:directory | :private_authorized_directory, binary()},
  capture_inspection(),
  keyword()
) ::
  {:ok, t()} | {:error, term()}

stop(store)

@spec stop(t()) :: :ok

transfer_owner(store, owner)

@spec transfer_owner(t(), pid()) :: :ok | {:error, atom()}