Skip to main content

mssf_core/runtime/
mod.rs

1// ------------------------------------------------------------
2// Copyright (c) Microsoft Corporation.  All rights reserved.
3// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
4// ------------------------------------------------------------
5
6use crate::Interface;
7
8use mssf_com::FabricCommon::{IFabricAsyncOperationCallback, IFabricAsyncOperationContext};
9use mssf_com::FabricRuntime::IFabricRuntime;
10
11pub use self::runtime_wrapper::Runtime;
12
13pub mod config;
14pub mod error;
15
16pub mod executor;
17pub mod node_context;
18
19pub mod package_change;
20
21pub mod runtime_wrapper;
22
23mod stateful_traits;
24pub use stateful_traits::{
25    IPrimaryReplicator, IReplicator, IStatefulServiceFactory, IStatefulServicePartition,
26    IStatefulServiceReplica,
27};
28
29pub mod stateful_bridge;
30
31pub mod stateful_proxy;
32
33mod stateless_traits;
34pub use stateless_traits::{
35    IStatelessServiceFactory, IStatelessServiceInstance, IStatelessServicePartition,
36};
37
38pub mod stateless_bridge;
39mod stateless_proxy;
40pub use stateless_proxy::StatelessServicePartition;
41pub mod store;
42
43pub mod store_proxy;
44
45mod activation_context;
46pub use activation_context::{CodePackageActivationContext, CodePackageInfo};
47
48// creates fabric runtime
49pub fn create_com_runtime() -> crate::Result<IFabricRuntime> {
50    crate::API_TABLE
51        .fabric_create_runtime()
52        .map_err(crate::Error::from)
53}
54
55pub fn get_com_activation_context<T: Interface>() -> crate::Result<T> {
56    crate::API_TABLE
57        .fabric_get_activation_context::<T>()
58        .map_err(crate::Error::from)
59}