Expose health status over RPC (#6274)
* Node-health to a separate crate. * Initialize node_health outside of dapps. * Expose health over RPC. * Bring back 412 and fix JS. * Add health to workspace and tests. * Fix compilation without default features. * Fix borked merge. * Revert to generics to avoid virtual calls. * Fix node-health tests. * Add missing trailing comma.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
extern crate futures;
|
||||
extern crate tokio_core;
|
||||
|
||||
use std::thread;
|
||||
use std::{fmt, thread};
|
||||
use std::sync::mpsc;
|
||||
use std::time::Duration;
|
||||
use futures::{Future, IntoFuture};
|
||||
@@ -81,7 +81,19 @@ enum Mode {
|
||||
ThreadPerFuture,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
impl fmt::Debug for Mode {
|
||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::Mode::*;
|
||||
|
||||
match *self {
|
||||
Tokio(_) => write!(fmt, "tokio"),
|
||||
Sync => write!(fmt, "synchronous"),
|
||||
ThreadPerFuture => write!(fmt, "thread per future"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Remote {
|
||||
inner: Mode,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user