From 6134f388d78a936bcfa617551782d66113552581 Mon Sep 17 00:00:00 2001 From: Mario Lubenka Date: Sun, 26 Sep 2021 20:04:57 +0200 Subject: [PATCH] chore: add StackHeadRpcRequest --- stackhead.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stackhead.go b/stackhead.go index a9bf7f8..0a4c1e8 100644 --- a/stackhead.go +++ b/stackhead.go @@ -7,12 +7,17 @@ const ( IntCmdUninstallPkgApk string = "stackhead:uninstall:package:apk" ) +type StackHeadRpcRequest struct { + Command string + Data interface{} +} + func ExecCmd(command string, args ...interface{}) error { c := &gorpc.Client{Addr: "localhost:1412"} c.Start() defer c.Stop() // All client methods issuing RPCs are thread-safe and goroutine-safe, // i.e. it is safe to call them from multiple concurrently running goroutines. - _, err := c.Call(command, args...) + _, err := c.Call(StackHeadRpcRequest{Command: command, Data: args}) return err }