mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-11-20 15:05:19 +00:00
Chore: expose RPC modules, update dependency (#35)
* feat: expose rpc clients * chore: expose rpc types * chore: update dependency
This commit is contained in:
parent
588bf39d7d
commit
8b410f2fc8
2377
Cargo.lock
generated
2377
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,7 @@ tokio = { version = "1.19.2", features = ["time", "macros"] }
|
||||
tokio-io-timeout = "1.2.0"
|
||||
tokio-util = { version = "0.6.10", features = ["codec", "compat", "time"] }
|
||||
tracing = "0.1.35"
|
||||
unsigned-varint = { version = "0.7.1", features = ["codec"] }
|
||||
unsigned-varint = { version = "=0.7.1", features = ["codec"] }
|
||||
if-addrs = "0.10.1"
|
||||
slog = "2.7.0"
|
||||
igd = "0.12.1"
|
||||
|
@ -23,6 +23,7 @@ lazy_static::lazy_static! {
|
||||
pub static ref TOLERABLE_DRIFT: chrono::Duration = chrono::Duration::seconds(5);
|
||||
}
|
||||
|
||||
#[allow(deprecated)]
|
||||
fn duration_since(timestamp: u32) -> chrono::Duration {
|
||||
let timestamp = i64::from(timestamp);
|
||||
let timestamp = chrono::NaiveDateTime::from_timestamp_opt(timestamp, 0).expect("should fit");
|
||||
|
@ -1,5 +1,6 @@
|
||||
mod api;
|
||||
mod r#impl;
|
||||
|
||||
pub use api::RpcClient;
|
||||
pub use api::RpcServer;
|
||||
pub use r#impl::RpcServerImpl;
|
||||
|
@ -7,7 +7,7 @@ mod admin;
|
||||
mod config;
|
||||
mod error;
|
||||
mod miner;
|
||||
mod types;
|
||||
pub mod types;
|
||||
mod zgs;
|
||||
|
||||
use crate::miner::RpcServer as MinerRpcServer;
|
||||
@ -29,7 +29,10 @@ use tokio::sync::mpsc::UnboundedSender;
|
||||
use zgs::RpcServer as ZgsRpcServer;
|
||||
use zgs_miner::MinerMessage;
|
||||
|
||||
pub use admin::RpcClient as ZgsAdminRpcClient;
|
||||
pub use config::Config as RPCConfig;
|
||||
pub use miner::RpcClient as ZgsMinerRpcClient;
|
||||
pub use zgs::RpcClient as ZgsRPCClient;
|
||||
|
||||
/// A wrapper around all the items required to spawn the HTTP server.
|
||||
///
|
||||
|
@ -2,5 +2,6 @@
|
||||
mod api;
|
||||
mod r#impl;
|
||||
|
||||
pub use api::RpcClient;
|
||||
pub use api::RpcServer;
|
||||
pub use r#impl::RpcServerImpl;
|
||||
|
@ -1,5 +1,6 @@
|
||||
mod api;
|
||||
mod r#impl;
|
||||
|
||||
pub use api::RpcClient;
|
||||
pub use api::RpcServer;
|
||||
pub use r#impl::RpcServerImpl;
|
||||
|
Loading…
Reference in New Issue
Block a user