WIP: Struct for concurrent swaps manager

This commit is contained in:
binarybaron 2023-08-15 12:20:44 +02:00
parent ec65ea2b27
commit bbcfffab6d
12 changed files with 411 additions and 484 deletions

View file

@ -14,6 +14,12 @@ use uuid::Uuid;
pub fn register_modules(context: Arc<Context>) -> RpcModule<Arc<Context>> {
let mut module = RpcModule::new(context);
module
.register_async_method("suspend_current_swap", |_, context| async move {
execute_request(Method::SuspendCurrentSwap, &context).await
})
.unwrap();
module
.register_async_method("get_swap_info", |params, context| async move {
let params: HashMap<String, Uuid> = params.parse()?;