diff options
author | Valery Piashchynski <[email protected]> | 2021-04-30 11:44:07 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-04-30 11:44:07 +0300 |
commit | 50aa751dcefc0ab0e96594a5f111ead316a34a70 (patch) | |
tree | 5cf1fd278e01e1bd23a3f39d408ceb49741c448c /plugins/informer/rpc.go | |
parent | 65015a3d3f4b387675b5ca005b8831a6be9e15aa (diff) |
- Update Lister implementation
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/informer/rpc.go')
-rw-r--r-- | plugins/informer/rpc.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/informer/rpc.go b/plugins/informer/rpc.go index b0b5b1af..8955af92 100644 --- a/plugins/informer/rpc.go +++ b/plugins/informer/rpc.go @@ -2,12 +2,10 @@ package informer import ( "github.com/spiral/roadrunner/v2/pkg/process" - "github.com/spiral/roadrunner/v2/plugins/logger" ) type rpc struct { srv *Plugin - log logger.Logger } // WorkerList contains list of workers. @@ -18,20 +16,17 @@ type WorkerList struct { // List all resettable services. func (rpc *rpc) List(_ bool, list *[]string) error { - rpc.log.Debug("Started List method") *list = make([]string, 0, len(rpc.srv.registry)) - for name := range rpc.srv.registry { + // append all plugin names to the output result + for name := range rpc.srv.available { *list = append(*list, name) } - rpc.log.Debug("list of services", "list", *list) - rpc.log.Debug("successfully finished List method") return nil } // Workers state of a given service. func (rpc *rpc) Workers(service string, list *WorkerList) error { - rpc.log.Debug("started Workers method", "service", service) workers, err := rpc.srv.Workers(service) if err != nil { return err @@ -40,7 +35,5 @@ func (rpc *rpc) Workers(service string, list *WorkerList) error { // write actual processes list.Workers = workers - rpc.log.Debug("list of workers", "workers", list.Workers) - rpc.log.Debug("successfully finished Workers method") return nil } |