13#include <asio/awaitable.hpp>
21namespace neograph::program {
28struct ProgramEffectResolution;
46class NEOGRAPH_PROGRAM_API ProgramHandle {
48 ProgramHandle(
const ProgramHandle&)
noexcept =
default;
49 ProgramHandle& operator=(
const ProgramHandle&)
noexcept =
default;
50 ProgramHandle(ProgramHandle&&)
noexcept =
default;
51 ProgramHandle& operator=(ProgramHandle&&)
noexcept =
default;
54 const std::string& run_id()
const noexcept;
56 const std::string& logical_run_id()
const noexcept;
57 const std::string& program_version_id()
const noexcept;
58 std::uint64_t attempt()
const noexcept;
67 bool cancel()
noexcept;
68 ProgramResult wait()
const;
69 asio::awaitable<ProgramResult> wait_async()
const;
70 std::optional<ProgramResult> try_result()
const;
71 std::vector<ProgramEvent> events_after(std::uint64_t sequence)
const;
72 std::optional<CoreCheckpointIdentity> latest_checkpoint()
const;
74 std::optional<ExactProgramHandoff> latest_handoff()
const;
81 asio::awaitable<ProgramHandoff> next_handoff_async()
const;
88 asio::awaitable<bool> cancel_async();
89 asio::awaitable<std::optional<ExactProgramHandoff>> latest_handoff_async()
const;
90 asio::awaitable<ProgramRunRecord> snapshot_async()
const;
118 std::vector<ProgramNotice> notices()
const;
119 ProgramHandle resume(ProgramRuntime& runtime, ProgramResume resume)
const;
120 ProgramHandle reconcile(ProgramRuntime& runtime,
121 ProgramEffectResolution resolution)
const;
124 explicit ProgramHandle(std::shared_ptr<detail::RunControl> control);
125 std::shared_ptr<detail::RunControl> control_;
127 friend class ProgramRuntime;
NEOGRAPH_API export/import macro for shared-library builds.
Move-only host lease holding a source generator at an exact durable checkpoint.
Deep-owned, content-addressed run snapshot used for reconnect and CAS publication.
Ordered event envelope for one Program run attempt.
Exact durable handoff receipts for Program generation replacement.
Immutable outcome of one Program run attempt.
Canonical immutable snapshot of one owner-scoped Program run.
A fact about how the runtime started a run that the caller should know.
std::string code
Stable identifier, for example P_FORK_PROVIDER_CALLS_NOT_JOURNALED.
std::string message
One sentence for a person.
json witness
The facts the message summarizes, as JSON.