| 35 | } |
| 36 | |
| 37 | Optional<KnobValue> ServerKnobCollection::tryParseKnobValue(std::string const& knobName, |
| 38 | std::string const& knobValue) const { |
| 39 | auto result = clientKnobCollection.tryParseKnobValue(knobName, knobValue); |
| 40 | if (result.present()) { |
| 41 | return result; |
| 42 | } |
| 43 | auto parsedKnobValue = serverKnobs.parseKnobValue(knobName, knobValue); |
| 44 | if (!std::holds_alternative<NoKnobFound>(parsedKnobValue)) { |
| 45 | return KnobValueRef::create(parsedKnobValue); |
| 46 | } |
| 47 | return {}; |
| 48 | } |
| 49 | |
| 50 | bool ServerKnobCollection::trySetKnob(std::string const& knobName, KnobValueRef const& knobValue) { |
| 51 | return clientKnobCollection.trySetKnob(knobName, knobValue) || knobValue.visitSetKnob(knobName, serverKnobs); |
nothing calls this directly
no test coverage detected