Skip to content

Commit

Permalink
static memory plugin fix
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Oct 27, 2023
1 parent 6a84494 commit 21f03a8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions plugins/zenoh-plugin-storage-manager/src/memory_backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@
//
use async_std::sync::RwLock;
use async_trait::async_trait;
use zenoh_plugin_trait::Plugin;
use std::collections::HashMap;
use std::sync::Arc;
use zenoh::prelude::r#async::*;
use zenoh::time::Timestamp;
use zenoh_backend_traits::config::{StorageConfig, VolumeConfig};
use zenoh_backend_traits::*;
use zenoh_plugin_trait::Plugin;
use zenoh_result::ZResult;

use crate::MEMORY_BACKEND_NAME;

pub fn create_memory_backend(config: VolumeConfig) -> ZResult<VolumePlugin> {
Ok(Box::new(MemoryBackend { config }))
}

pub struct MemoryBackend {
config: VolumeConfig,
}
Expand All @@ -38,8 +34,10 @@ impl Plugin for MemoryBackend {

const STATIC_NAME: &'static str = MEMORY_BACKEND_NAME;

fn start(name: &str, args: &Self::StartArgs) -> ZResult<Self::RunningPlugin> {
todo!()
fn start(_: &str, args: &VolumeConfig) -> ZResult<VolumePlugin> {
Ok(Box::new(MemoryBackend {
config: args.clone(),
}))
}
}

Expand Down

0 comments on commit 21f03a8

Please sign in to comment.