Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Jan 16, 2024
1 parent 0d3393e commit 18e6212
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion plugins/zenoh-plugin-storage-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ impl RunningPluginTrait for StorageRuntime {
) -> ZResult<Vec<zenoh::plugins::Response>> {
let mut responses = Vec::new();
let mut key = String::from(plugin_status_key);
// TODO: to be removed when "__version__" is implemented in admin space
// TODO: to be removed when "__version__" is implemented in admoin space
with_extended_string(&mut key, &["/version"], |key| {
if keyexpr::new(key.as_str())
.unwrap()
Expand Down
14 changes: 7 additions & 7 deletions zenoh/src/plugins/sealed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ pub trait RunningPluginTrait: Send + Sync + PluginControl {
/// Thus the plugin can reply its contribution to the global admin space of this zenohd.
/// Parameters:
/// * `selector`: the full selector of the query (usually only key_expr part is used). This selector is
/// exactly the same as it was requested by user, for example "@/router/ROUTER_ID/plugins/PLUGIN_NAME/some/plugin/info" or "@/router/*/plugins/*/foo/bar".
/// exactly the same as it was requested by user, for example "@/router/ROUTER_ID/plugins/PLUGIN_NAME/some/plugin/info" or "@/router/*/plugins/*/foo/bar".
/// But the plugin's [adminspace_getter] is called only if the selector matches the [plugin_status_key]
/// * `plugin_status_key`: the actual path to plugin's status in the admin space. For example "@/router/ROUTER_ID/plugins/PLUGIN_NAME"
/// Returns value:
/// * `Ok(Vec<Response>)`: the list of responses to the query. For example if plugins can return information on subleys "foo", "bar", "foo/buzz" and "bar/buzz"
/// * `Ok(Vec<Response>)`: the list of responses to the query. For example if plugins can return information on subleys "foo", "bar", "foo/buzz" and "bar/buzz"
/// and it's requested with the query "@/router/ROUTER_ID/plugins/PLUGIN_NAME/*", it should return only information on "foo" and "bar" subkeys, but not on "foo/buzz" and "bar/buzz"
/// as they doesn't match the query.
/// * `Err(ZError)`: Problem occured when processing the query.
///
/// * `Err(ZError)`: Problem occured when processing the query.
///
/// If plugin implements subplugins (as the storage plugin), then it should also reply with information about its subplugins with the same rules.
///
/// TODO:
///
/// TODO:
/// * add example
/// * rework the admin space: rework "with_extented_string" function, provide it as utility for plugins
/// * reorder paramaters: plugin_status_key should be first as it describes the root of pluginb's admin space
/// * Instead of ZResult return just Vec. Check, do we really need ZResult? If yes, make it separate for each status record.
///
///
fn adminspace_getter<'a>(
&'a self,
_selector: &'a Selector<'a>,
Expand Down

0 comments on commit 18e6212

Please sign in to comment.