Support sending out RPCs for multiple status messages
This lets us start, stop, and restart multiple applications at once
efficiently. There is nothing in the RPC protocol that requires a
specific response.
Change-Id: If0b933aef726075a47648c9e33ab1f48b5155c0f
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/starter/starter_rpc_lib.h b/aos/starter/starter_rpc_lib.h
index 7d6de873..fdea0b7 100644
--- a/aos/starter/starter_rpc_lib.h
+++ b/aos/starter/starter_rpc_lib.h
@@ -30,6 +30,14 @@
const aos::Configuration *config,
std::chrono::milliseconds timeout);
+// Sends lots of commands and waits for them all to succeed. There must not be
+// more than 1 conflicting command in here which modifies the state of a single
+// application otherwise it will never succeed. An example is having both a
+// start and stop command for a single application.
+bool SendCommandBlocking(
+ std::vector<std::pair<aos::starter::Command, std::string_view>> commands,
+ const aos::Configuration *config, std::chrono::milliseconds timeout);
+
// Fetches the status of the application with the given name. Creates a
// temporary event loop from the provided config for fetching. Returns an empty
// flatbuffer if the application is not found.