aboutsummaryrefslogtreecommitdiffstats
path: root/configd/src/apps/sentinel/cmdq.h
diff options
context:
space:
mode:
Diffstat (limited to 'configd/src/apps/sentinel/cmdq.h')
-rw-r--r--configd/src/apps/sentinel/cmdq.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/configd/src/apps/sentinel/cmdq.h b/configd/src/apps/sentinel/cmdq.h
index 38c95967d70..105d5f29b60 100644
--- a/configd/src/apps/sentinel/cmdq.h
+++ b/configd/src/apps/sentinel/cmdq.h
@@ -5,7 +5,6 @@
#include <memory>
#include <mutex>
#include <vector>
-#include <string>
class FRT_RPCRequest;
@@ -14,16 +13,14 @@ namespace config::sentinel {
class Cmd {
public:
using UP = std::unique_ptr<Cmd>;
- enum CmdType { LIST, RESTART, START, STOP, CHECK_CONNECTIVITY };
+ enum CmdType { LIST, RESTART, START, STOP };
- Cmd(FRT_RPCRequest *req, CmdType cmdType, std::string name = "", int portnum = 0)
- : _req(req), _cmdType(cmdType), _name(name), _port(portnum)
+ Cmd(FRT_RPCRequest *req, CmdType cmdType, const char *service = "")
+ : _req(req), _cmdType(cmdType), _serviceName(service)
{}
CmdType type() const { return _cmdType; }
- // the service name or host name:
- const std::string & name() const { return _name; }
- int portNumber() const { return _port; }
+ const char *serviceName() const { return _serviceName; }
void retError(const char *errorString) const;
void retValue(const char *valueString) const;
@@ -32,8 +29,7 @@ public:
private:
FRT_RPCRequest *_req;
CmdType _cmdType;
- std::string _name;
- int _port;
+ const char *_serviceName;
};
class CommandQueue