| 129 | } |
| 130 | |
| 131 | bool |
| 132 | Records::SetSV(const cripts::Context *context, const cripts::string_view value) const |
| 133 | { |
| 134 | TSAssert(context->state.txnp); |
| 135 | |
| 136 | switch (_type) { |
| 137 | case TS_RECORDDATATYPE_STRING: { |
| 138 | if (TSHttpTxnConfigStringSet(context->state.txnp, _key, value.data(), value.size()) != TS_SUCCESS) { |
| 139 | TSError("Failed to set string configuration '%s'", _name.c_str()); |
| 140 | return false; |
| 141 | } |
| 142 | CDebug("Set string configuration '{}' to '{}'", _name.c_str(), value); |
| 143 | } break; |
| 144 | default: |
| 145 | CFatal("[Records]: Invalid configuration type for setSV()"); |
| 146 | return false; |
| 147 | } |
| 148 | |
| 149 | return true; // Success |
| 150 | } |
| 151 | |
| 152 | // Static members for the records "cache" |
| 153 | void |