pub enum StorageDispatcher {
InMemory(InMemoryBackend),
Postgres(PostgresBackend),
}Expand description
Concrete dispatcher that delegates to the configured storage backend.
Uses an enum instead of dyn trait to avoid dyn-compatibility issues
with async return types.
Variants§
InMemory(InMemoryBackend)
Postgres(PostgresBackend)
Implementations§
Trait Implementations§
Source§impl StorageBackend for StorageDispatcher
impl StorageBackend for StorageDispatcher
async fn save_trace(&self, trace: &TraceRow) -> Result<(), StorageError>
async fn load_traces( &self, limit: usize, offset: usize, ) -> Result<Vec<TraceRow>, StorageError>
async fn get_trace( &self, trace_id: u64, ) -> Result<Option<TraceRow>, StorageError>
async fn delete_traces(&self, ids: &[u64]) -> Result<u64, StorageError>
async fn save_session(&self, entry: &SessionRow) -> Result<(), StorageError>
async fn load_sessions( &self, scope: &str, ) -> Result<Vec<SessionRow>, StorageError>
async fn delete_session( &self, scope: &str, key: &str, ) -> Result<bool, StorageError>
async fn save_daemon(&self, daemon: &DaemonRow) -> Result<(), StorageError>
async fn load_daemons(&self) -> Result<Vec<DaemonRow>, StorageError>
async fn delete_daemon(&self, name: &str) -> Result<bool, StorageError>
async fn append_audit(&self, entry: &AuditRow) -> Result<(), StorageError>
async fn query_audit(&self, limit: usize) -> Result<Vec<AuditRow>, StorageError>
async fn save_axon_store( &self, store: &AxonStoreRow, ) -> Result<(), StorageError>
async fn load_axon_stores(&self) -> Result<Vec<AxonStoreRow>, StorageError>
async fn delete_axon_store(&self, name: &str) -> Result<bool, StorageError>
async fn save_dataspace(&self, ds: &DataspaceRow) -> Result<(), StorageError>
async fn load_dataspaces(&self) -> Result<Vec<DataspaceRow>, StorageError>
async fn delete_dataspace(&self, name: &str) -> Result<bool, StorageError>
async fn save_hibernation( &self, session: &HibernationRow, ) -> Result<(), StorageError>
async fn load_hibernations(&self) -> Result<Vec<HibernationRow>, StorageError>
async fn append_event(&self, event: &EventRow) -> Result<(), StorageError>
async fn query_events( &self, topic: Option<&str>, limit: usize, ) -> Result<Vec<EventRow>, StorageError>
async fn save_cache_entry(&self, entry: &CacheRow) -> Result<(), StorageError>
async fn load_cache_entries(&self) -> Result<Vec<CacheRow>, StorageError>
async fn evict_expired_cache(&self) -> Result<u64, StorageError>
async fn record_cost(&self, cost: &CostRow) -> Result<(), StorageError>
async fn query_costs( &self, flow: Option<&str>, limit: usize, ) -> Result<Vec<CostRow>, StorageError>
async fn save_schedule( &self, schedule: &ScheduleRow, ) -> Result<(), StorageError>
async fn load_schedules(&self) -> Result<Vec<ScheduleRow>, StorageError>
async fn delete_schedule(&self, name: &str) -> Result<bool, StorageError>
async fn is_healthy(&self) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for StorageDispatcher
impl !UnwindSafe for StorageDispatcher
impl Freeze for StorageDispatcher
impl Send for StorageDispatcher
impl Sync for StorageDispatcher
impl Unpin for StorageDispatcher
impl UnsafeUnpin for StorageDispatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.