Viceroy icon indicating copy to clipboard operation
Viceroy copied to clipboard

Interactive Mode

Open cratelyn opened this issue 4 years ago • 1 comments

In addition to running as a daemon, there should be an option (given via a CLI flag) to run Viceroy "interactively", meaning that requests are provided in sequence via stdin and responses via stdout. This configuration will allow Viceroy to be more easily used in test harnesses that are not equipped to run and interact with a daemon.

Reported by @aturon.

cratelyn avatar Jul 12 '21 15:07 cratelyn

Ah, I think this may be related — I was using Viceroy in a pretty quick edit/compile/test loop, and wound up writing a "one shot" script, which would (1) start Viceroy, (2) wait for it to be ready, (3) send a single request to it via curl, and then (4) shut it down. This was relatively difficult, because (AFAIK) the only way to do (1) and (3) interactively is with some relatively fragile job control shenanigans, and the only way to do (2) is to try and send requests until one of them succeeds.

I guess I could use this mode for that purpose? How would I provide a request? Just the protocol text?

peterbourgon avatar Jul 12 '21 15:07 peterbourgon