summaryrefslogtreecommitdiff
path: root/service/rpc/system.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-02 22:00:51 +0300
committerWolfy-J <[email protected]>2019-05-02 22:00:51 +0300
commit658254359597aa85fa4679abd821dd06855b61e9 (patch)
tree9bf220d54a1e0896e7b0800f5905f0cab069b8fb /service/rpc/system.go
parent0cf4be46a04ee33bf04d08787b6dc8b46b932c1a (diff)
stop command added
Diffstat (limited to 'service/rpc/system.go')
-rw-r--r--service/rpc/system.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/service/rpc/system.go b/service/rpc/system.go
new file mode 100644
index 00000000..778250ad
--- /dev/null
+++ b/service/rpc/system.go
@@ -0,0 +1,18 @@
+package rpc
+
+import "github.com/spiral/roadrunner/service"
+
+// systemService service controls roadrunner server.
+type systemService struct {
+ c service.Container
+}
+
+// Stop the underlying c.
+func (s *systemService) Stop(stop bool, r *string) error {
+ if stop {
+ s.c.Stop()
+ }
+ *r = "OK"
+
+ return nil
+}