diff options
author | Wolfy-J <[email protected]> | 2018-06-03 13:00:02 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-03 13:00:02 +0300 |
commit | d1290a636e70d1797261c189285cc6fc6310a0be (patch) | |
tree | 0bafecfad1c94f4bf7b28f909e2f72a8da7ca4bd /cmd/rr | |
parent | 89b1e86b6e3fbb099ba6bd34ac0501f752b4514c (diff) |
simplier stuff
Diffstat (limited to 'cmd/rr')
-rw-r--r-- | cmd/rr/cmd/root.go | 4 | ||||
-rw-r--r-- | cmd/rr/cmd/serve.go | 4 | ||||
-rw-r--r-- | cmd/rr/http/register.go | 2 | ||||
-rw-r--r-- | cmd/rr/http/reload.go | 2 | ||||
-rw-r--r-- | cmd/rr/http/workers.go | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go index a9f27e9d..dc5ab487 100644 --- a/cmd/rr/cmd/root.go +++ b/cmd/rr/cmd/root.go @@ -33,7 +33,7 @@ import ( // Service bus for all the commands. var ( // Shared service bus. - Bus = service.NewBus() + Services = service.NewBus() // Root is application endpoint. Root = &cobra.Command{ @@ -64,7 +64,7 @@ func init() { } if cfg := initConfig(cfgFile, []string{"."}, ".rr"); cfg != nil { - if err := Bus.Configure(cfg); err != nil { + if err := Services.Configure(cfg); err != nil { panic(err) } } diff --git a/cmd/rr/cmd/serve.go b/cmd/rr/cmd/serve.go index f5524556..7d982128 100644 --- a/cmd/rr/cmd/serve.go +++ b/cmd/rr/cmd/serve.go @@ -42,7 +42,7 @@ func init() { } func serveHandler(cmd *cobra.Command, args []string) { - Bus.Serve() + Services.Serve() <-stopSignal - Bus.Stop() + Services.Stop() } diff --git a/cmd/rr/http/register.go b/cmd/rr/http/register.go index a670427c..b8447ed4 100644 --- a/cmd/rr/http/register.go +++ b/cmd/rr/http/register.go @@ -6,5 +6,5 @@ import ( ) func init() { - rr.Bus.Register(&http.Service{}) + rr.Services.Register(&http.Service{}) } diff --git a/cmd/rr/http/reload.go b/cmd/rr/http/reload.go index 6caf0a71..17588d00 100644 --- a/cmd/rr/http/reload.go +++ b/cmd/rr/http/reload.go @@ -35,7 +35,7 @@ func init() { } func reloadHandler(cmd *cobra.Command, args []string) { - client, err := rr.Bus.RCPClient() + client, err := rr.Services.RCPClient() if err != nil { panic(err) // todo: change } diff --git a/cmd/rr/http/workers.go b/cmd/rr/http/workers.go index c1225987..22551384 100644 --- a/cmd/rr/http/workers.go +++ b/cmd/rr/http/workers.go @@ -38,7 +38,7 @@ func init() { } func workersHandler(cmd *cobra.Command, args []string) { - client, err := rr.Bus.RCPClient() + client, err := rr.Services.RCPClient() if err != nil { panic(err) // todo: change } |