TSHttpOverridableConfig¶
Synopsis¶
#include <ts/ts.h>
-
TSReturnCode
TSHttpTxnConfigIntSet
(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtInt value)¶
-
TSReturnCode
TSHttpTxnConfigIntGet
(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtInt *value)¶
-
TSReturnCode
TSHttpTxnConfigFloatSet
(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtFloat value)¶
-
TSReturnCode
TSHttpTxnConfigFloatGet
(TSHttpTxn txnp, TSOverridableConfigKey key, TSMgmtFloat *value)¶
-
TSReturnCode
TSHttpTxnConfigStringSet
(TSHttpTxn txnp, TSOverridableConfigKey key, const char *value, int length)¶
-
TSReturnCode
TSHttpTxnConfigStringGet
(TSHttpTxn txnp, TSOverridableConfigKey key, const char **value, int *length)¶
-
TSReturnCode
TSHttpTxnConfigFind
(const char *name, int length, TSOverridableConfigKey *key, TSRecordDataType *type)¶
Description¶
Some of the values that are set in records.config
can be changed for a
specific transaction. It is important to note that these functions change the
configuration values stored for the transaction, which is not quite the same as
changing the actual operating values of the transaction. The critical effect is
the value must be changed before it is used by the transaction - after that,
changes will not have any effect.
All of the ...Get
functions store the internal value in the storage
indicated by the value argument. For strings length* will receive
the length of the string.
The values are identified by the enumeration TSOverridableConfigKey
.
String values can be used indirectly by first passing them to
TSHttpTxnConfigFind()
which, if the string matches an overridable value,
return the key and data type.
Configurations¶
Testing TS_CONFIG_BODY_FACTORY_TEMPLATE_BASE
.
The following configurations (from records.config
) are overridable:
TSOverridableConfigKey Value |
Configuration Value |
---|---|
Examples¶
Enable transaction buffer control with a
high water mark of 262144
and a low water mark of 65536
.
int callback(TSCont contp, TSEvent event, void* data)
{
TSHttpTxn txnp = static_cast<TSHttpTxn>(data);
TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED, 1);
TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK, 262144);
TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_FLOW_CONTROL_LOWER_WATER_MARK, 65536);
return 0;
}
See Also¶
TSAPI(3ts)