rob05c commented on a change in pull request #7023:
URL: https://github.com/apache/trafficserver/pull/7023#discussion_r469583614
##########
File path: include/ts/nexthop.h
##########
@@ -30,20 +30,20 @@
#include <ts/apidefs.h>
-// plugin callback commands.
enum NHCmd { NH_MARK_UP, NH_MARK_DOWN };
-struct NHHealthStatus {
- virtual bool isNextHopAvailable(TSHttpTxn txn, const char *hostname, const
int port, void *ih = nullptr) = 0;
- virtual void markNextHop(TSHttpTxn txn, const char *hostname, const int
port, const NHCmd status, void *ih = nullptr,
- const time_t now = 0)
= 0;
- virtual ~NHHealthStatus() {}
-};
+class TSNextHopSelectionStrategy
Review comment:
I can move this to `include/tscpp`. Is that ok?
Sort of. `TSNextHopSelectionStrategy` is used by the Remap hook
`TSRemapInitStrategy`, not in InkApi.cc. A Remap plugin can still be C and just
not implement that function.
Likewise, `TSHttpTxnParentResult(G|S)et` in InkApi.cc uses a
`TSParentResult`, which has C++ stuff in it. I just exposed that struct to the
API, I didn't create it. If someone doesn't need to call that function, if I
move `parentresult.h` to `include/tscpp`, someone can write a C plugin and just
not call the functions that use it.
Is that ok? Or is there a better way?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]