core: seams for parallel work: services.rs (boot), graph.rs (documents for /proc), activation.rs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
//! The interface graph (PROTOCOL.md section 10.4): the `rpc.discover`
|
||||
//! documents of all plugins, their imports, and the result of each check.
|
||||
//!
|
||||
//! The `/proc` layer reads the files of `/proc/core/` through these
|
||||
//! functions. They must be cheap and must not block: they return cached data.
|
||||
use crate::Host;
|
||||
use serde_json::Value;
|
||||
|
||||
// The /proc layer (T6) uses these functions. Remove this when it does.
|
||||
#[allow(dead_code)]
|
||||
impl Host {
|
||||
/// The content of `/proc/core/graph.json`.
|
||||
pub(crate) fn graph_json(&self) -> Vec<u8> {
|
||||
b"{}\n".to_vec()
|
||||
}
|
||||
|
||||
/// The content of `/proc/core/graph.dot`.
|
||||
pub(crate) fn graph_dot(&self) -> Vec<u8> {
|
||||
b"digraph plugins {}\n".to_vec()
|
||||
}
|
||||
|
||||
/// The plugins that have an `rpc.discover` document, for `/proc/core/plugins/`.
|
||||
pub(crate) fn discovered_plugins(&self) -> Vec<String> {
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
/// The `rpc.discover` document of the current `plugin.wasm` of `plugin`.
|
||||
pub(crate) fn discover_document(&self, _plugin: &str) -> Option<Value> {
|
||||
None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user