Front the whole network's help through HelpServ
Each service now exposes its help catalog via Service::help_topics; the engine collects them into a network-wide index on Network, reachable through two new NetView methods. HelpServ uses it: HELP <service> [command] (or a bare service name) serves any service's per-command help, bare HELP lists the services, and its own ticket commands still work. No cross-crate dependency: the catalog flows through the SDK's NetView, keeping every module dependent only on echo-api.
This commit is contained in:
parent
69a93198ff
commit
fcca8e4e3b
17 changed files with 151 additions and 6 deletions
|
|
@ -68,6 +68,10 @@ impl Service for BotServ {
|
|||
"Bot Services"
|
||||
}
|
||||
|
||||
fn help_topics(&self) -> (&'static str, &'static [HelpEntry]) {
|
||||
(BLURB, TOPICS)
|
||||
}
|
||||
|
||||
fn on_command(&mut self, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, net: &dyn NetView, db: &mut dyn Store) {
|
||||
let me = self.uid.as_str();
|
||||
match args.first().map(|s| s.to_ascii_uppercase()).as_deref() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue