YEP: | 114 |
---|---|
Title: | yaqd-controld Specification |
Authors: | Kyle Sunden |
Status: | draft |
Tags: | standard |
Post-History: | 2022-07-19 |
This YEP proposes a standard special yaq daemon to expose functionality of yaqd-control
over a yaq TCP interface.
Such a daemon provides the ability to configure daemons, start/stop/enable/disable background daemons, listing available daemons and informing of their status.
The tools provided by yaqd-control
(and specifically the yaqd
command line interface) are useful for managing daemons, but other than listing and checking status only work for daemons running on the local machine.
Additionally, this daemon could serve as a dynamic platform to build additional functionality useful for managing daemon states.
yaqd-controld
is a special yaq daemon serving on port 46000 (outside of the normal range for yaq daemons, not expected to appear in most list and status queries).
This daemon provides the following messages:
get_daemon_config
¶parameter: kind
: string
response: string
Get the contents of the config file for kind
edit_daemon_config
¶parameter: kind
: string
parameter: body
: string
Write the contents of body
to the config file for kind
start
¶parameter: kind
: string or list of string
Start a daemon or set of daemons running in the background service manager.
stop
¶parameter: kind
: string or list of string
Stop a daemon or set of daemons running in the background service manager.
enable
¶parameter: kind
: string or list of string
TODO: authentication story (password entry is currently interactive, not thrilled with passing in plain text over the network)
Enable a daemon or set of daemons in the background service manager.
disable
¶parameter: kind
: string or list of string
Disable a daemon or set of daemons in the background service manager.
list
¶List known local daemons, providing host, port, kind, and name for each. Provided as a map of record entries, formatting is client side.
status
¶List known local daemons, providing host, port, kind, and name, online status, busy status for each. Provided as a map of record entries, formatting is client side.
yaqd
client entry point can then be updated to use the yaqd-controld
backend when available, while defaulting to current behavior when not.
It can be made to be more dynamic, allowing additional parameters and/or interactive prompts to choose whether to run locally or remotely.
Sharing of known daemons across the network can be done via yaqd-controld
rather than only by scanning, which can be a slow process.
While not part of the initial specification, this daemon could be used a the basis to run more dynamic sets of daemons (i.e. running daemons in the background without using system service manager to persist across reboots).
Additionally, this daemon could be used to consolidate and query logs from running daemons.
This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive.
built 2023-10-10 23:52:42 CC0: no copyright