Skip to content

Commit

Permalink
runtime: Rename the rpc crate to enclave_rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
Yawning committed Jun 11, 2020
1 parent 7f0a966 commit dfbe2d1
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 20 deletions.
1 change: 1 addition & 0 deletions .changelog/2469.internal.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime: Rename the rpc crate to enclave_rpc
6 changes: 3 additions & 3 deletions client/src/rpc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ use tokio_executor::spawn;
use oasis_core_runtime::common::runtime::RuntimeId;
use oasis_core_runtime::{
common::{cbor, sgx::avr::EnclaveIdentity},
protocol::Protocol,
rpc::{
enclave_rpc::{
session::{Builder, Session},
types,
},
protocol::Protocol,
};

#[cfg(not(target_env = "sgx"))]
Expand Down Expand Up @@ -400,8 +400,8 @@ mod test {
use tokio::runtime::Runtime;

use oasis_core_runtime::{
enclave_rpc::{demux::Demux, session, types},
rak::RAK,
rpc::{demux::Demux, session, types},
};

use super::{super::transport::Transport, RpcClient};
Expand Down
2 changes: 1 addition & 1 deletion client/src/rpc/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use io_context::Context;

#[cfg(not(target_env = "sgx"))]
use oasis_core_runtime::common::runtime::RuntimeId;
use oasis_core_runtime::{common::cbor, protocol::Protocol, rpc::types, types::Body};
use oasis_core_runtime::{common::cbor, enclave_rpc::types, protocol::Protocol, types::Body};

#[cfg(not(target_env = "sgx"))]
use super::api::{CallEnclaveRequest, EnclaveRPCClient};
Expand Down
2 changes: 1 addition & 1 deletion keymanager-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use oasis_core_client::{create_rpc_api_client, BoxFuture, RpcClient};
use oasis_core_keymanager_api_common::*;
use oasis_core_runtime::{
common::{cbor, runtime::RuntimeId, sgx::avr::EnclaveIdentity},
enclave_rpc::session,
protocol::Protocol,
rak::RAK,
rpc::session,
};

use super::KeyManagerClient;
Expand Down
2 changes: 1 addition & 1 deletion keymanager-lib/src/kdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ use oasis_core_runtime::{
runtime::RuntimeId,
sgx::egetkey::egetkey,
},
enclave_rpc::Context as RpcContext,
executor::Executor,
rpc::Context as RpcContext,
runtime_context,
storage::StorageContext,
BUILD_INFO,
Expand Down
7 changes: 3 additions & 4 deletions keymanager-lib/src/keymanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ use anyhow::Result;
use oasis_core_keymanager_api_common::*;
use oasis_core_runtime::{
dispatcher::Initializer,
rak::RAK,
register_runtime_rpc_methods,
rpc::{
enclave_rpc::{
dispatcher::{Method as RpcMethod, MethodDescriptor as RpcMethodDescriptor},
Context as RpcContext,
},
Protocol, RpcDemux, RpcDispatcher, TxnDispatcher,
rak::RAK,
register_runtime_rpc_methods, Protocol, RpcDemux, RpcDispatcher, TxnDispatcher,
};

use crate::{context, kdf::Kdf, policy::Policy};
Expand Down
2 changes: 1 addition & 1 deletion keymanager-lib/src/methods.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Methods exported to remote clients via EnclaveRPC.
use anyhow::Result;
use oasis_core_keymanager_api_common::*;
use oasis_core_runtime::rpc::Context as RpcContext;
use oasis_core_runtime::enclave_rpc::Context as RpcContext;

use crate::{kdf::Kdf, policy::Policy};

Expand Down
2 changes: 1 addition & 1 deletion keymanager-lib/src/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use oasis_core_runtime::{
seal::{seal, unseal},
},
},
rpc::Context as RpcContext,
enclave_rpc::Context as RpcContext,
runtime_context,
storage::StorageContext,
};
Expand Down
6 changes: 3 additions & 3 deletions runtime/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ use crate::{
logger::get_logger,
roothash::{Block, ComputeResultsHeader, COMPUTE_RESULTS_HEADER_CONTEXT},
},
protocol::{Protocol, ProtocolUntrustedLocalStorage},
rak::RAK,
rpc::{
enclave_rpc::{
demux::Demux as RpcDemux,
dispatcher::Dispatcher as RpcDispatcher,
types::{Message as RpcMessage, Request as RpcRequest},
Context as RpcContext,
},
protocol::{Protocol, ProtocolUntrustedLocalStorage},
rak::RAK,
storage::{
mkvs::{
sync::{HostReadSyncer, NoopReadSyncer},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ macro_rules! register_runtime_rpc_methods {
) => {
$(
$rpc_dispatcher.add_method(
$crate::rpc::dispatcher::Method::new(
$crate::rpc::dispatcher::MethodDescriptor {
$crate::enclave_rpc::dispatcher::Method::new(
$crate::enclave_rpc::dispatcher::MethodDescriptor {
name: stringify!($method_name).to_owned(),
},
|args: &$arguments_type,
ctx: &mut $crate::rpc::context::Context|
ctx: &mut $crate::enclave_rpc::context::Context|
-> ::anyhow::Result<$output_type> {
$method_name(args, ctx)
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ use sgx_isa::{AttributesFlags, Report};
#[macro_use]
pub mod common;
pub mod dispatcher;
pub mod enclave_rpc;
pub mod executor;
pub mod init;
pub mod macros;
pub mod protocol;
pub mod rak;
pub mod rpc;
pub mod storage;
pub mod tracing;
pub mod transaction;
Expand Down Expand Up @@ -121,8 +121,8 @@ pub struct BuildInfo {

// Re-exports.
pub use self::{
enclave_rpc::{demux::Demux as RpcDemux, dispatcher::Dispatcher as RpcDispatcher},
init::start_runtime,
protocol::Protocol,
rpc::{demux::Demux as RpcDemux, dispatcher::Dispatcher as RpcDispatcher},
transaction::dispatcher::{Dispatcher as TxnDispatcher, MethodDispatcher as TxnMethDispatcher},
};

0 comments on commit dfbe2d1

Please sign in to comment.