summaryrefslogtreecommitdiff
path: root/cmd/rr/http/reset.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-26 22:30:53 +0300
committerWolfy-J <[email protected]>2018-09-26 22:30:53 +0300
commita206fc3270ea6e469b1704f15f2f15a9f6a14bbd (patch)
tree68bc61c49f84db861976659abed3784bb7e304a9 /cmd/rr/http/reset.go
parentd24c43aaeff897394eca140478c73dd146f8710a (diff)
improved debug handlers
Diffstat (limited to 'cmd/rr/http/reset.go')
-rw-r--r--cmd/rr/http/reset.go12
1 files changed, 2 insertions, 10 deletions
diff --git a/cmd/rr/http/reset.go b/cmd/rr/http/reset.go
index f1129eef..3d84dbce 100644
--- a/cmd/rr/http/reset.go
+++ b/cmd/rr/http/reset.go
@@ -21,12 +21,9 @@
package http
import (
- "errors"
"github.com/spf13/cobra"
rr "github.com/spiral/roadrunner/cmd/rr/cmd"
- "github.com/spiral/roadrunner/cmd/rr/util"
- "github.com/spiral/roadrunner/service"
- "github.com/spiral/roadrunner/service/rpc"
+ "github.com/spiral/roadrunner/cmd/util"
)
func init() {
@@ -38,12 +35,7 @@ func init() {
}
func reloadHandler(cmd *cobra.Command, args []string) error {
- svc, st := rr.Container.Get(rpc.ID)
- if st < service.StatusOK {
- return errors.New("RPC service is not configured")
- }
-
- client, err := svc.(*rpc.Service).Client()
+ client, err := util.RPCClient(rr.Container)
if err != nil {
return err
}