Skip to content

Commit

Permalink
session move unfinished
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Apr 2, 2024
1 parent 5bd3e99 commit 2378d5c
Show file tree
Hide file tree
Showing 25 changed files with 416 additions and 353 deletions.
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async fn run(runtime: Runtime, selector: KeyExpr<'_>, flag: Arc<AtomicBool>) {
env_logger::init();

// create a zenoh Session that shares the same Runtime than zenohd
let session = zenoh::init(runtime).res().await.unwrap();
let session = zenoh::session::init(runtime).res().await.unwrap();

// the HasMap used as a storage by this example of storage plugin
let mut stored: HashMap<String, Sample> = HashMap::new();
Expand Down
4 changes: 2 additions & 2 deletions plugins/zenoh-plugin-rest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use zenoh::prelude::r#async::*;
use zenoh::query::{QueryConsolidation, Reply};
use zenoh::runtime::Runtime;
use zenoh::selector::TIME_RANGE_KEY;
use zenoh::Session;
use zenoh::session::Session;
use zenoh_plugin_trait::{plugin_long_version, plugin_version, Plugin, PluginControl};
use zenoh_result::{bail, zerror, ZResult};

Expand Down Expand Up @@ -490,7 +490,7 @@ pub async fn run(runtime: Runtime, conf: Config) -> ZResult<()> {
let _ = env_logger::try_init();

let zid = runtime.zid().to_string();
let session = zenoh::init(runtime).res().await.unwrap();
let session = zenoh::session::init(runtime).res().await.unwrap();

let mut app = Server::with_state((Arc::new(session), zid));
app.with(
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-storage-manager/src/backends_mgt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use super::storages_mgt::*;
use flume::Sender;
use std::sync::Arc;
use zenoh::Session;
use zenoh::session::Session;
use zenoh_backend_traits::config::StorageConfig;
use zenoh_backend_traits::{Capability, VolumeInstance};
use zenoh_result::ZResult;
Expand Down
4 changes: 2 additions & 2 deletions plugins/zenoh-plugin-storage-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use storages_mgt::StorageMessage;
use zenoh::plugins::{RunningPluginTrait, ZenohPlugin};
use zenoh::prelude::sync::*;
use zenoh::runtime::Runtime;
use zenoh::Session;
use zenoh::session::Session;
use zenoh_backend_traits::config::ConfigDiff;
use zenoh_backend_traits::config::PluginConfig;
use zenoh_backend_traits::config::StorageConfig;
Expand Down Expand Up @@ -114,7 +114,7 @@ impl StorageRuntimeInner {
let plugins_manager = PluginsManager::dynamic(lib_loader.clone(), BACKEND_LIB_PREFIX)
.declare_static_plugin::<MemoryBackend>();

let session = Arc::new(zenoh::init(runtime.clone()).res_sync()?);
let session = Arc::new(zenoh::session::init(runtime.clone()).res_sync()?);

// After this moment result should be only Ok. Failure of loading of one voulme or storage should not affect others.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::str::FromStr;
use zenoh::payload::StringOrBase64;
use zenoh::prelude::r#async::*;
use zenoh::time::Timestamp;
use zenoh::Session;
use zenoh::session::Session;

pub struct AlignQueryable {
session: Arc<Session>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use zenoh::payload::StringOrBase64;
use zenoh::prelude::r#async::*;
use zenoh::sample::builder::SampleBuilder;
use zenoh::time::Timestamp;
use zenoh::Session;
use zenoh::session::Session;

pub struct Aligner {
session: Arc<Session>,
Expand Down
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-storage-manager/src/replica/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use urlencoding::encode;
use zenoh::payload::StringOrBase64;
use zenoh::prelude::r#async::*;
use zenoh::time::Timestamp;
use zenoh::Session;
use zenoh::session::Session;
use zenoh_backend_traits::config::{ReplicaConfig, StorageConfig};

pub mod align_queryable;
Expand Down
Loading

0 comments on commit 2378d5c

Please sign in to comment.