|
| 1 | +.. Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 | + contributor license agreements. See the NOTICE file distributed |
| 3 | + with this work for additional information regarding copyright |
| 4 | + ownership. The ASF licenses this file to you under the Apache |
| 5 | + License, Version 2.0 (the "License"); you may not use this file |
| 6 | + except in compliance with the License. You may obtain a copy of |
| 7 | + the License at |
| 8 | +
|
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +
|
| 11 | + Unless required by applicable law or agreed to in writing, software |
| 12 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 14 | + implied. See the License for the specific language governing |
| 15 | + permissions and limitations under the License. |
| 16 | +
|
| 17 | +.. include:: ../../../common.defs |
| 18 | + |
| 19 | +.. default-domain:: cpp |
| 20 | + |
| 21 | +TSHttpTxnNextHopNameGet |
| 22 | +*********************** |
| 23 | + |
| 24 | +Synopsis |
| 25 | +======== |
| 26 | + |
| 27 | +.. code-block:: cpp |
| 28 | +
|
| 29 | + #include <ts/ts.h> |
| 30 | +
|
| 31 | +.. function:: void TSHttpTxnNextHopStrategySet(TSHttpTxn txnp, void const* strategy) |
| 32 | + |
| 33 | +Description |
| 34 | +=========== |
| 35 | + |
| 36 | +Sets the next hop strategy for the transaction :arg:`txnp` |
| 37 | +This :arg:`strategy` pointer must be a valid strategy and can be |
| 38 | +nullptr to indicate that parent.config will be used instead. |
| 39 | + |
| 40 | +Plugins can get a strategy by name by calling |
| 41 | +:func:`TSHttpTxnNextHopStrategyGet` to get the current transaction's |
| 42 | +active strategy or :func:`TSHttpTxnNextHopNamedStrategyGet` to |
| 43 | +look up a strategy by name using the transaction's pointer to the |
| 44 | +NextHopStrategyFactory strategy database. |
| 45 | + |
| 46 | +.. note:: |
| 47 | + |
| 48 | + This strategy pointer must not be freed and the contents must not |
| 49 | + be changed. |
| 50 | + Strategy pointers held by plugins will become invalid when ATS |
| 51 | + configs are reloaded and should be reset with :func:`TSRemapNewInstance` |
| 52 | + |
| 53 | +See Also |
| 54 | +======== |
| 55 | + |
| 56 | +:func:`TSHttpTxnNextHopStrategyGet`, :func:`TSHttpTxnNextHopNamedStrategyGet`. |
0 commit comments