Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
A Redis-backed storage backend for cross-process shared state.
Uses [ConnectionManager] which is Clone (internally Arc-based) and automatically reconnects on transient failures. Trie persistence uses an atomic single JSON blob SET - no partial update is possible.
impl RedisBackendimpl RedisBackend
newpub async fn new(url: &str, key_prefix: impl Into<String>) -> Result<Self>
Connect to Redis and return a new RedisBackend.
url - Redis connection URL (e.g. redis://127.0.0.1:6379).key_prefix - String prepended to every Redis key (e.g. "nemo_relay:").Returns AdaptiveError::Storage if the client cannot be created or the connection cannot be established.
impl StorageBackend for RedisBackendimpl StorageBackend for RedisBackend
store_runfn store_run(
&self,
record: &RunRecord,
) -> impl Future<Output = Result<()>> + Send
load_planfn load_plan(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Option<ExecutionPlan>>> + Send
list_runsfn list_runs(
&self,
agent_id: &str,
) -> impl Future<Output = Result<Vec<RunRecord>>> + Send
impl StorageBackendDyn for RedisBackendimpl StorageBackendDyn for RedisBackend
store_run_dynfn store_run_dyn<'a>(
&'a self,
record: &'a RunRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_plan_dynfn load_plan_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<ExecutionPlan>>> + Send + 'a>>
list_runs_dynfn list_runs_dyn<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunRecord>>> + Send + 'a>>
store_triefn store_trie<'a>(
&'a self,
agent_id: &'a str,
envelope: &'a TrieEnvelope,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_triefn load_trie<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<TrieEnvelope>>> + Send + 'a>>
store_accumulatorsfn store_accumulators<'a>(
&'a self,
agent_id: &'a str,
state: &'a AccumulatorState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_accumulatorsfn load_accumulators<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<AccumulatorState>>> + Send + 'a>>
store_planfn store_plan(&self, plan: &ExecutionPlan) -> Result<()>
store_observationsfn store_observations<'a>(
&'a self,
agent_id: &'a str,
observations: &'a [PromptIR],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_observationsfn load_observations<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<PromptIR>>>> + Send + 'a>>
store_stabilityfn store_stability<'a>(
&'a self,
agent_id: &'a str,
result: &'a StabilityAnalysisResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>
load_stabilityfn load_stability<'a>(
&'a self,
agent_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<StabilityAnalysisResult>>> + Send + 'a>>