rename admin/handler to admin/processor

Handler is overused. Handler ought to mean the end-function handling the
command. The command processor is the central dispatcher to the handler.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-08-28 01:33:58 +00:00
parent f4db6292b3
commit f047675a63
3 changed files with 18 additions and 16 deletions

View file

@ -4,7 +4,7 @@
pub(crate) mod admin;
pub(crate) mod command;
pub(crate) mod handler;
pub(crate) mod processor;
mod tests;
pub(crate) mod utils;
@ -36,14 +36,18 @@ conduit::mod_ctor! {}
conduit::mod_dtor! {}
conduit::rustc_flags_capture! {}
/// Install the admin command handler
/// Install the admin command processor
pub async fn init(admin_service: &service::admin::Service) {
_ = admin_service
.complete
.write()
.expect("locked for writing")
.insert(handler::complete);
_ = admin_service.handle.write().await.insert(handler::handle);
.insert(processor::complete);
_ = admin_service
.handle
.write()
.await
.insert(processor::dispatch);
}
/// Uninstall the admin command handler