pub struct InMemoryStore { /* private fields */ }Expand description
In-memory store backed by Arc<RwLock<..>>.
Thread-safe and cheap to clone. All data is held in memory and lost on drop.
§Examples
use ironflow_store::memory::InMemoryStore;
let store = InMemoryStore::new();
let store2 = store.clone(); // cheap Arc cloneImplementations§
Trait Implementations§
Source§impl ApiKeyStore for InMemoryStore
impl ApiKeyStore for InMemoryStore
Source§fn create_api_key(&self, req: NewApiKey) -> StoreFuture<'_, ApiKey>
fn create_api_key(&self, req: NewApiKey) -> StoreFuture<'_, ApiKey>
Create a new API key.
Source§fn find_api_key_by_prefix(
&self,
prefix: &str,
) -> StoreFuture<'_, Option<ApiKey>>
fn find_api_key_by_prefix( &self, prefix: &str, ) -> StoreFuture<'_, Option<ApiKey>>
Find an API key by its prefix (first 8 chars). Read more
Source§fn find_api_key_by_id(&self, id: Uuid) -> StoreFuture<'_, Option<ApiKey>>
fn find_api_key_by_id(&self, id: Uuid) -> StoreFuture<'_, Option<ApiKey>>
Find an API key by ID.
Source§fn list_api_keys_by_user(&self, user_id: Uuid) -> StoreFuture<'_, Vec<ApiKey>>
fn list_api_keys_by_user(&self, user_id: Uuid) -> StoreFuture<'_, Vec<ApiKey>>
List all API keys for a user.
Source§fn update_api_key(&self, id: Uuid, update: ApiKeyUpdate) -> StoreFuture<'_, ()>
fn update_api_key(&self, id: Uuid, update: ApiKeyUpdate) -> StoreFuture<'_, ()>
Update an API key.
Source§fn touch_api_key(&self, id: Uuid) -> StoreFuture<'_, ()>
fn touch_api_key(&self, id: Uuid) -> StoreFuture<'_, ()>
Record that an API key was used (updates
last_used_at).Source§fn delete_api_key(&self, id: Uuid) -> StoreFuture<'_, ()>
fn delete_api_key(&self, id: Uuid) -> StoreFuture<'_, ()>
Delete an API key.
Source§impl Clone for InMemoryStore
impl Clone for InMemoryStore
Source§fn clone(&self) -> InMemoryStore
fn clone(&self) -> InMemoryStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryStore
impl Debug for InMemoryStore
Source§impl Default for InMemoryStore
impl Default for InMemoryStore
Source§impl RunStore for InMemoryStore
impl RunStore for InMemoryStore
Source§fn create_run(&self, req: NewRun) -> StoreFuture<'_, Run>
fn create_run(&self, req: NewRun) -> StoreFuture<'_, Run>
Create a new run in
Pending status.Source§fn get_run(&self, id: Uuid) -> StoreFuture<'_, Option<Run>>
fn get_run(&self, id: Uuid) -> StoreFuture<'_, Option<Run>>
Get a run by ID. Returns
None if not found.Source§fn list_runs(
&self,
filter: RunFilter,
page: u32,
per_page: u32,
) -> StoreFuture<'_, Page<Run>>
fn list_runs( &self, filter: RunFilter, page: u32, per_page: u32, ) -> StoreFuture<'_, Page<Run>>
List runs matching the given filter, with pagination. Read more
Source§fn update_run_status(
&self,
id: Uuid,
new_status: RunStatus,
) -> StoreFuture<'_, ()>
fn update_run_status( &self, id: Uuid, new_status: RunStatus, ) -> StoreFuture<'_, ()>
Update a run’s status with FSM validation. Read more
Source§fn update_run(&self, id: Uuid, update: RunUpdate) -> StoreFuture<'_, ()>
fn update_run(&self, id: Uuid, update: RunUpdate) -> StoreFuture<'_, ()>
Apply a partial update to a run. Read more
Source§fn pick_next_pending(&self) -> StoreFuture<'_, Option<Run>>
fn pick_next_pending(&self) -> StoreFuture<'_, Option<Run>>
Atomically pick the oldest pending run and transition it to
Running. Read moreSource§fn create_step(&self, req: NewStep) -> StoreFuture<'_, Step>
fn create_step(&self, req: NewStep) -> StoreFuture<'_, Step>
Create a new step for a run. Read more
Source§fn update_step(&self, id: Uuid, update: StepUpdate) -> StoreFuture<'_, ()>
fn update_step(&self, id: Uuid, update: StepUpdate) -> StoreFuture<'_, ()>
Apply a partial update to a step after execution. Read more
Source§fn list_steps(&self, run_id: Uuid) -> StoreFuture<'_, Vec<Step>>
fn list_steps(&self, run_id: Uuid) -> StoreFuture<'_, Vec<Step>>
List all steps for a run, ordered by position ascending.
Source§fn get_stats(&self) -> StoreFuture<'_, RunStats>
fn get_stats(&self) -> StoreFuture<'_, RunStats>
Get aggregated statistics across all runs. Read more
Source§fn create_step_dependencies(
&self,
deps: Vec<NewStepDependency>,
) -> StoreFuture<'_, ()>
fn create_step_dependencies( &self, deps: Vec<NewStepDependency>, ) -> StoreFuture<'_, ()>
Create step dependency edges in batch. Read more
Source§fn list_step_dependencies(
&self,
run_id: Uuid,
) -> StoreFuture<'_, Vec<StepDependency>>
fn list_step_dependencies( &self, run_id: Uuid, ) -> StoreFuture<'_, Vec<StepDependency>>
List all step dependencies for a given run. Read more
Source§fn update_run_returning(
&self,
id: Uuid,
update: RunUpdate,
) -> StoreFuture<'_, Run>
fn update_run_returning( &self, id: Uuid, update: RunUpdate, ) -> StoreFuture<'_, Run>
Apply a partial update to a run and return the updated run. Read more
Source§impl UserStore for InMemoryStore
impl UserStore for InMemoryStore
Source§fn create_user(&self, req: NewUser) -> StoreFuture<'_, User>
fn create_user(&self, req: NewUser) -> StoreFuture<'_, User>
Create a new user. Read more
Source§fn find_user_by_email(&self, email: &str) -> StoreFuture<'_, Option<User>>
fn find_user_by_email(&self, email: &str) -> StoreFuture<'_, Option<User>>
Find a user by email. Returns
None if not found.Source§fn find_user_by_id(&self, id: Uuid) -> StoreFuture<'_, Option<User>>
fn find_user_by_id(&self, id: Uuid) -> StoreFuture<'_, Option<User>>
Find a user by ID. Returns
None if not found.Auto Trait Implementations§
impl Freeze for InMemoryStore
impl !RefUnwindSafe for InMemoryStore
impl Send for InMemoryStore
impl Sync for InMemoryStore
impl Unpin for InMemoryStore
impl UnsafeUnpin for InMemoryStore
impl !UnwindSafe for InMemoryStore
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