rob05c opened a new pull request #7023:
URL: https://github.com/apache/trafficserver/pull/7023


   Adds a remap plugin hook to add a nexthop strategy object, and moves and 
adds other necessary API symbols necessary to implement strategies in plugins.
   
   Also adds an example nexthop strategy plugin.
   
   This adds the following to the API:
   ```
   enum TSHostStatus
   enum TSHostStatusReason
   enum TSParentResultType
   class TSNextHopSelectionStrategy
   struct TSParentResult
   const char *ParentResultStr
   struct TSParentResult
   bool TSHostnameIsSelf(const char* hostname)
   bool TSHostStatusGet(const char *hostname, TSHostStatus* status, unsigned 
int *reason)
   void TSHostStatusSet(const char *hostname, TSHostStatus status, const 
unsigned int down_time, const unsigned int reason)
   struct TSParentResult* TSHttpTxnParentResultGet(TSHttpTxn txnp)
   TSReturnCode TSRemapInitStrategy(TSNextHopSelectionStrategy *&strategy, void 
*ih, char *errbuf, int errbuf_size)
   ```
   
   I tried to minimize API changes, but I didn't see a way to do it any 
smaller. 
   The example plugin is also a lot of duplication from the core ConsistentHash 
strategy. I didn't see a reasonable way to reduce that either, while keeping 
the ConsistentHash strategy in core for now. 
   I'm definitely open to suggestions.
   


----------------------------------------------------------------
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]


Reply via email to