brbzull0 commented on a change in pull request #8689:
URL: https://github.com/apache/trafficserver/pull/8689#discussion_r827899430
##########
File path: src/traffic_ctl_jsonrpc/jsonrpc/CtrlRPCRequests.h
##########
@@ -129,10 +139,16 @@ struct HostSetStatusRequest : shared::rpc::ClientRequest {
}
};
-struct HostGetStatusRequest : shared::rpc::RecordLookupRequest {
- static constexpr auto STATUS_PREFIX = "proxy.process.host_status";
- using super = shared::rpc::RecordLookupRequest;
- HostGetStatusRequest() : super() {}
+struct HostGetStatusRequest : shared::rpc::ClientRequest {
+ using super = shared::rpc::ClientRequest;
+ using Params = std::vector<std::string>;
+ HostGetStatusRequest(Params p) { super::params = std::move(p); }
+
+ std::string
+ get_method() const
+ {
Review comment:
> it's not clear why this even needs to be a virtual function
Because of this
https://github.com/apache/trafficserver/blob/68e69e27b87576abfaa7a1bbeb8394795c522e82/include/shared/rpc/yaml_codecs.h#L211
>Should derived classes just set the "method" member string?
yes they can, in which case `JSONRPCRequest::get_method` will return it.
I wasn't very concern about the virtual thing in here as this is used by
`traffic_ctl` and `traffic_top`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]