diff options
author | Wolfy-J <[email protected]> | 2018-06-13 22:24:47 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-13 22:24:47 +0300 |
commit | df4c11fb59b8ffca369f14eededda82884ee4dad (patch) | |
tree | c59b4af544cf11008739313a54b878cc20db793d /cmd/rr | |
parent | 235adef3eef67888e4c391b28cedadfb3f8874e3 (diff) |
more tests + rpc tests
Diffstat (limited to 'cmd/rr')
-rw-r--r-- | cmd/rr/http/reset.go | 2 | ||||
-rw-r--r-- | cmd/rr/http/workers.go | 2 | ||||
-rw-r--r-- | cmd/rr/main.go | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cmd/rr/http/reset.go b/cmd/rr/http/reset.go index 907022c3..d0a42b64 100644 --- a/cmd/rr/http/reset.go +++ b/cmd/rr/http/reset.go @@ -38,7 +38,7 @@ func init() { } func reloadHandler(cmd *cobra.Command, args []string) error { - svc, st := rr.Container.Get(rpc.Name) + svc, st := rr.Container.Get(rpc.ID) if st < service.StatusConfigured { return errors.New("RPC service is not configured") } diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go index 871d8c86..728c415e 100644 --- a/cmd/rr/http/workers.go +++ b/cmd/rr/http/workers.go @@ -73,7 +73,7 @@ func workersHandler(cmd *cobra.Command, args []string) (err error) { } }() - svc, st := rr.Container.Get(rrpc.Name) + svc, st := rr.Container.Get(rrpc.ID) if st < service.StatusConfigured { return errors.New("RPC service is not configured") } diff --git a/cmd/rr/main.go b/cmd/rr/main.go index 68311da2..5b73d326 100644 --- a/cmd/rr/main.go +++ b/cmd/rr/main.go @@ -42,13 +42,13 @@ var debugMode bool func main() { // provides ability to make local connection to services - rr.Container.Register(rpc.Name, &rpc.Service{}) + rr.Container.Register(rpc.ID, &rpc.Service{}) // http serving - rr.Container.Register(http.Name, &http.Service{}) + rr.Container.Register(http.ID, &http.Service{}) // serving static files - rr.Container.Register(static.Name, &static.Service{}) + rr.Container.Register(static.ID, &static.Service{}) // provides additional verbosity @@ -56,7 +56,7 @@ func main() { rr.CLI.PersistentFlags().BoolVarP(&debugMode, "debug", "d", false, "debug mode", ) cobra.OnInitialize(func() { if debugMode { - service, _ := rr.Container.Get(http.Name) + service, _ := rr.Container.Get(http.ID) service.(*http.Service).AddListener(debug.NewListener(rr.Logger).Listener) } }) |