diff options
author | Valery Piashchynski <[email protected]> | 2020-11-17 16:25:35 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-17 16:25:35 +0300 |
commit | 3cbdd3d3e44b3b4e72565d666391e3b732950774 (patch) | |
tree | 7c60fafe1c33076631e39fe26be187c9ca359a3e /plugins/http/rpc.go | |
parent | a57d064407e2ed7f35dd591101b5d421c64605e1 (diff) |
Get http working with new container
Diffstat (limited to 'plugins/http/rpc.go')
-rw-r--r-- | plugins/http/rpc.go | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/plugins/http/rpc.go b/plugins/http/rpc.go index 7b38dece..56d8f1a1 100644 --- a/plugins/http/rpc.go +++ b/plugins/http/rpc.go @@ -1,34 +1,34 @@ package http -import ( - "github.com/pkg/errors" - "github.com/spiral/roadrunner/util" -) +//import ( +// "github.com/pkg/errors" +// "github.com/spiral/roadrunner/util" +//) -type rpcServer struct{ svc *Service } - -// WorkerList contains list of workers. -type WorkerList struct { - // Workers is list of workers. - Workers []*util.State `json:"workers"` -} - -// Reset resets underlying RR worker pool and restarts all of it's workers. -func (rpc *rpcServer) Reset(reset bool, r *string) error { - if rpc.svc == nil || rpc.svc.handler == nil { - return errors.New("http server is not running") - } - - *r = "OK" - return rpc.svc.Server().Reset() -} - -// Workers returns list of active workers and their stats. -func (rpc *rpcServer) Workers(list bool, r *WorkerList) (err error) { - if rpc.svc == nil || rpc.svc.handler == nil { - return errors.New("http server is not running") - } - - r.Workers, err = util.ServerState(rpc.svc.Server()) - return err -} +//type rpcServer struct{ svc *Plugin } +// +//// WorkerList contains list of workers. +//type WorkerList struct { +// // Workers is list of workers. +// Workers []*util.State `json:"workers"` +//} +// +//// Reset resets underlying RR worker pool and restarts all of it's workers. +//func (rpc *rpcServer) Reset(reset bool, r *string) error { +// if rpc.svc == nil || rpc.svc.handler == nil { +// return errors.New("http server is not running") +// } +// +// *r = "OK" +// return rpc.svc.Server().Reset() +//} +// +//// Workers returns list of active workers and their stats. +//func (rpc *rpcServer) Workers(list bool, r *WorkerList) (err error) { +// if rpc.svc == nil || rpc.svc.handler == nil { +// return errors.New("http server is not running") +// } +// +// r.Workers, err = util.ServerState(rpc.svc.Server()) +// return err +//} |