-
Notifications
You must be signed in to change notification settings - Fork 835
New TS APIs - TSHttpTxnConfigParse/TSHttpTxnConfigSet #12284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
After talked with @zwoop, this is trying to combine current type specific set APIs into one |
HttpStatusCodeList *, | ||
HostResData *, | ||
HttpForwardedConf *, | ||
TSOutboundConnectionMatchType>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, this variant captures all types in the OverridableHttpConfigParams
. However, as @zwoop pointed out, every time we add a new type here, ABI compatibility is broken 🤔
This is getting big change, so let me divide into 2 steps. 1). Make negative_caching_list/negative_revalidating_list overridable with |
Address #12292. Using
MgmtConverter
for list and other containers has a overhead because the per-remap configurations are stored as a string and parsed on every transactions. This PR avoids that cost by parsing the string once at config-load time by introducing new TS APIs.New TS APIs Proposal
TSHttpTxnConfigParse
parses given string into appropriate data structure and stores it in aTSConfigValue
. It's a variant of data structures.TSHttpTxnConfigSet
set the parsedTSConfigValue
to the transaction to override a variable.TSConfigValue
is astd::variant
for type safety and future extension.Usage
The changes in
conf_remap
illustrate how to use the new APIs.HttpStatusCodeList *
byTSHttpTxnConfigParse
and store it in theTSConfigValue
TSHttpTxnConfigSet