mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-14 03:07:57 +01:00
26 lines
637 B
Rust
26 lines
637 B
Rust
use futures_util::future;
|
|
use futures_util::future::BoxFuture;
|
|
use std::collections::HashMap;
|
|
|
|
use crate::actors::Actor;
|
|
use crate::db::ArchivedValue;
|
|
use crate::resources::state::State;
|
|
|
|
pub struct Dummy {
|
|
name: String,
|
|
params: HashMap<String, String>,
|
|
}
|
|
|
|
impl Dummy {
|
|
pub fn new(name: String, params: HashMap<String, String>) -> Self {
|
|
Self { name, params }
|
|
}
|
|
}
|
|
|
|
impl Actor for Dummy {
|
|
fn apply(&mut self, state: ArchivedValue<State>) -> BoxFuture<'static, ()> {
|
|
tracing::info!(name=%self.name, params=?self.params, ?state, "dummy actor updating state");
|
|
Box::pin(future::ready(()))
|
|
}
|
|
}
|