| 294 | crate::collect!(String, SharedProxy); |
| 295 | |
| 296 | pub fn load_shared( |
| 297 | cfg: &crate::config::interlayer::Node, |
| 298 | graphs: &crate::config::interlayer::Config, |
| 299 | ctx: Context, |
| 300 | resources: ResourceCollection, |
| 301 | ) -> Result<SharedProxy> { |
| 302 | let local_key = ctx.local_key; |
| 303 | let (s, r) = unbounded(); |
| 304 | let shared = Shared::new(ctx.local_key, r, cfg, graphs)?.boxed(); |
| 305 | let handle = shared.start(ctx, resources); |
| 306 | SharedHandle::registry_local() |
| 307 | .get(local_key) |
| 308 | .insert(cfg.entity.name.clone(), SharedHandle(handle)); |
| 309 | SharedProxy::new(local_key, s, cfg) |
| 310 | } |