backend/director admin states
Dridi Boukelmoune
dridi at varni.sh
Fri May 4 08:00:45 UTC 2018
On Fri, May 4, 2018 at 9:42 AM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> --------
<snip>
> The reason we have include/tbl/cli_cmds.h in the first place was
> that I wanted some kind of "schema-light" for UX use, but that
> didn't happen.
Yes, that experiment failed, but I somehow succeeded in doing
something similar for varnishtest: a schema for commands and
a generic parser dispatches TheRightThing(tm) to callbacks. It
worked with nested commands too although I only implemented
a dozen in total. The generic parser squared some of the
concurrency issues too by keeping track of all parties.
I don't have time these days for such experiments :(
<snip>
> I don't see a need for varnishd to ship code to varnishadm though,
> so I'd be happy with a design where varnishd CLI always spits out
> JSON, and varnishadm is responsible for formatting it, if required.
The reason I wanted to centralize the json2txt code is to also ensure
that varnishd -d and varnishtest logs stay readable. If we want
varnishadm to take advantage of its interactive mode to align columns
and whatnots, we can always have a json2matrix step and then render
it.
> As long as somebody who is not me writes the code for it...
>
> PS: We have a solid JSON parser in the tree already.
All we need is TheNewGuy(tm) to dump this on their desk :p
Cheers
More information about the varnish-dev
mailing list