summaryrefslogtreecommitdiff
path: root/plugins/status/rpc.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-09-16 17:12:37 +0300
committerValery Piashchynski <[email protected]>2021-09-16 17:12:37 +0300
commitf3491c089b4da77fd8d2bc942a88b6b8d117a8a5 (patch)
tree32bfffb1f24eeee7b909747cc00a6a6b9fd3ee83 /plugins/status/rpc.go
parent5d2cd55ab522d4f1e65a833f91146444465a32ac (diff)
Move plugins to a separate repository
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/status/rpc.go')
-rw-r--r--plugins/status/rpc.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/plugins/status/rpc.go b/plugins/status/rpc.go
deleted file mode 100644
index 755a06fa..00000000
--- a/plugins/status/rpc.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package status
-
-import (
- "github.com/spiral/errors"
- "github.com/spiral/roadrunner/v2/plugins/logger"
-)
-
-type rpc struct {
- srv *Plugin
- log logger.Logger
-}
-
-// Status return current status of the provided plugin
-func (rpc *rpc) Status(service string, status *Status) error {
- const op = errors.Op("checker_rpc_status")
- rpc.log.Debug("started Status method", "service", service)
- st, err := rpc.srv.status(service)
- if err != nil {
- return errors.E(op, err)
- }
-
- *status = st
-
- rpc.log.Debug("status code", "code", st.Code)
- rpc.log.Debug("successfully finished the Status method")
- return nil
-}
-
-// Status return current status of the provided plugin
-func (rpc *rpc) Ready(service string, status *Status) error {
- const op = errors.Op("checker_rpc_ready")
- rpc.log.Debug("started Ready method", "service", service)
- st, err := rpc.srv.ready(service)
- if err != nil {
- return errors.E(op, err)
- }
-
- *status = st
-
- rpc.log.Debug("status code", "code", st.Code)
- rpc.log.Debug("successfully finished the Ready method")
- return nil
-}