NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::program::ProgramStore Class Referenceabstract

Atomic storage of admitted Program bundles and versions, as the catalog uses it (#556). More...

#include <store.h>

Inheritance diagram for neograph::program::ProgramStore:
[legend]

Public Member Functions

virtual asio::awaitable< std::optional< ProgramActivation > > get_activation (std::string_view) const
 Owner-scoped activation lifecycle.
 
virtual asio::awaitable< std::optional< ProgramActivationBinding > > get_active_binding (std::string_view owner_scope) const
 Return one coherent activation/version tuple.
 
virtual asio::awaitable< std::optional< ProgramBundle > > get_bundle (std::string_view, std::string_view) const
 Owner-qualified lookups.
 
virtual asio::awaitable< void > publish_admitted (const ProgramBundle &bundle, const ProgramVersion &version)=0
 Atomically publish one admitted bundle/version tuple.
 

Detailed Description

Atomic storage of admitted Program bundles and versions, as the catalog uses it (#556).

Every operation is awaitable; a store whose backend is synchronous completes it at once (SyncProgramStore). The arguments of a call, string views included, must stay alive until the awaitable completes: await it in the full expression that makes the call.

Definition at line 36 of file store.h.

Member Function Documentation

◆ get_activation()

virtual asio::awaitable< std::optional< ProgramActivation > > neograph::program::ProgramStore::get_activation ( std::string_view  ) const
inlinevirtual

Owner-scoped activation lifecycle.

The default keeps the bounded P2 adapter intentionally administration-inaccessible. Implementations must verify that the target version and policy hash belong to owner_scope and must return Conflict without publishing when the generation is stale.

Reimplemented in neograph::program::SyncProgramStore.

Definition at line 78 of file store.h.

◆ get_active_binding()

virtual asio::awaitable< std::optional< ProgramActivationBinding > > neograph::program::ProgramStore::get_active_binding ( std::string_view  owner_scope) const
inlinevirtual

Return one coherent activation/version tuple.

Implementations must read both records under their backend lock or transaction; a missing or corrupt target fails closed rather than returning a partial tuple.

Reimplemented in neograph::program::SyncProgramStore.

Definition at line 88 of file store.h.

◆ get_bundle()

virtual asio::awaitable< std::optional< ProgramBundle > > neograph::program::ProgramStore::get_bundle ( std::string_view  ,
std::string_view   
) const
inlinevirtual

Owner-qualified lookups.

A wrong owner is indistinguishable from an absent object. The legacy unqualified overloads remain available for local migration/introspection callers, but Catalog and Runtime must use these overloads for authority-bearing resolution.

Reimplemented in neograph::program::SyncProgramStore.

Definition at line 58 of file store.h.

◆ publish_admitted()

virtual asio::awaitable< void > neograph::program::ProgramStore::publish_admitted ( const ProgramBundle &  bundle,
const ProgramVersion &  version 
)
pure virtual

Atomically publish one admitted bundle/version tuple.

Implementations must provide the strong exception guarantee: if this call throws, neither object may become observable through get_bundle() or get_version().

Implemented in neograph::program::SyncProgramStore.


The documentation for this class was generated from the following file: