pub trait StorageBackend: Send + Sync {
Show 31 methods
// Required methods
fn save_trace(
&self,
trace: &TraceRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_traces(
&self,
limit: usize,
offset: usize,
) -> impl Future<Output = Result<Vec<TraceRow>, StorageError>> + Send;
fn get_trace(
&self,
trace_id: u64,
) -> impl Future<Output = Result<Option<TraceRow>, StorageError>> + Send;
fn delete_traces(
&self,
ids: &[u64],
) -> impl Future<Output = Result<u64, StorageError>> + Send;
fn save_session(
&self,
entry: &SessionRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_sessions(
&self,
scope: &str,
) -> impl Future<Output = Result<Vec<SessionRow>, StorageError>> + Send;
fn delete_session(
&self,
scope: &str,
key: &str,
) -> impl Future<Output = Result<bool, StorageError>> + Send;
fn save_daemon(
&self,
daemon: &DaemonRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_daemons(
&self,
) -> impl Future<Output = Result<Vec<DaemonRow>, StorageError>> + Send;
fn delete_daemon(
&self,
name: &str,
) -> impl Future<Output = Result<bool, StorageError>> + Send;
fn append_audit(
&self,
entry: &AuditRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn query_audit(
&self,
limit: usize,
) -> impl Future<Output = Result<Vec<AuditRow>, StorageError>> + Send;
fn save_axon_store(
&self,
store: &AxonStoreRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_axon_stores(
&self,
) -> impl Future<Output = Result<Vec<AxonStoreRow>, StorageError>> + Send;
fn delete_axon_store(
&self,
name: &str,
) -> impl Future<Output = Result<bool, StorageError>> + Send;
fn save_dataspace(
&self,
ds: &DataspaceRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_dataspaces(
&self,
) -> impl Future<Output = Result<Vec<DataspaceRow>, StorageError>> + Send;
fn delete_dataspace(
&self,
name: &str,
) -> impl Future<Output = Result<bool, StorageError>> + Send;
fn save_hibernation(
&self,
session: &HibernationRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_hibernations(
&self,
) -> impl Future<Output = Result<Vec<HibernationRow>, StorageError>> + Send;
fn append_event(
&self,
event: &EventRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn query_events(
&self,
topic: Option<&str>,
limit: usize,
) -> impl Future<Output = Result<Vec<EventRow>, StorageError>> + Send;
fn save_cache_entry(
&self,
entry: &CacheRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_cache_entries(
&self,
) -> impl Future<Output = Result<Vec<CacheRow>, StorageError>> + Send;
fn evict_expired_cache(
&self,
) -> impl Future<Output = Result<u64, StorageError>> + Send;
fn record_cost(
&self,
cost: &CostRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn query_costs(
&self,
flow: Option<&str>,
limit: usize,
) -> impl Future<Output = Result<Vec<CostRow>, StorageError>> + Send;
fn save_schedule(
&self,
schedule: &ScheduleRow,
) -> impl Future<Output = Result<(), StorageError>> + Send;
fn load_schedules(
&self,
) -> impl Future<Output = Result<Vec<ScheduleRow>, StorageError>> + Send;
fn delete_schedule(
&self,
name: &str,
) -> impl Future<Output = Result<bool, StorageError>> + Send;
fn is_healthy(&self) -> impl Future<Output = bool> + Send;
}Expand description
Async trait for persistent storage backends.
All methods are async and return Result<T, StorageError>.
Implementations must be Send + Sync for use across async tasks.
Required Methods§
fn save_trace( &self, trace: &TraceRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_traces( &self, limit: usize, offset: usize, ) -> impl Future<Output = Result<Vec<TraceRow>, StorageError>> + Send
fn get_trace( &self, trace_id: u64, ) -> impl Future<Output = Result<Option<TraceRow>, StorageError>> + Send
fn delete_traces( &self, ids: &[u64], ) -> impl Future<Output = Result<u64, StorageError>> + Send
fn save_session( &self, entry: &SessionRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_sessions( &self, scope: &str, ) -> impl Future<Output = Result<Vec<SessionRow>, StorageError>> + Send
fn delete_session( &self, scope: &str, key: &str, ) -> impl Future<Output = Result<bool, StorageError>> + Send
fn save_daemon( &self, daemon: &DaemonRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_daemons( &self, ) -> impl Future<Output = Result<Vec<DaemonRow>, StorageError>> + Send
fn delete_daemon( &self, name: &str, ) -> impl Future<Output = Result<bool, StorageError>> + Send
fn append_audit( &self, entry: &AuditRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn query_audit( &self, limit: usize, ) -> impl Future<Output = Result<Vec<AuditRow>, StorageError>> + Send
fn save_axon_store( &self, store: &AxonStoreRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_axon_stores( &self, ) -> impl Future<Output = Result<Vec<AxonStoreRow>, StorageError>> + Send
fn delete_axon_store( &self, name: &str, ) -> impl Future<Output = Result<bool, StorageError>> + Send
fn save_dataspace( &self, ds: &DataspaceRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_dataspaces( &self, ) -> impl Future<Output = Result<Vec<DataspaceRow>, StorageError>> + Send
fn delete_dataspace( &self, name: &str, ) -> impl Future<Output = Result<bool, StorageError>> + Send
fn save_hibernation( &self, session: &HibernationRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_hibernations( &self, ) -> impl Future<Output = Result<Vec<HibernationRow>, StorageError>> + Send
fn append_event( &self, event: &EventRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn query_events( &self, topic: Option<&str>, limit: usize, ) -> impl Future<Output = Result<Vec<EventRow>, StorageError>> + Send
fn save_cache_entry( &self, entry: &CacheRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_cache_entries( &self, ) -> impl Future<Output = Result<Vec<CacheRow>, StorageError>> + Send
fn evict_expired_cache( &self, ) -> impl Future<Output = Result<u64, StorageError>> + Send
fn record_cost( &self, cost: &CostRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn query_costs( &self, flow: Option<&str>, limit: usize, ) -> impl Future<Output = Result<Vec<CostRow>, StorageError>> + Send
fn save_schedule( &self, schedule: &ScheduleRow, ) -> impl Future<Output = Result<(), StorageError>> + Send
fn load_schedules( &self, ) -> impl Future<Output = Result<Vec<ScheduleRow>, StorageError>> + Send
fn delete_schedule( &self, name: &str, ) -> impl Future<Output = Result<bool, StorageError>> + Send
fn is_healthy(&self) -> impl Future<Output = bool> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".