MCPcopy Create free account
hub / github.com/apple/foundationdb / tryParseKnobValue

Method tryParseKnobValue

fdbclient/ServerKnobCollection.cpp:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37Optional<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
50bool ServerKnobCollection::trySetKnob(std::string const& knobName, KnobValueRef const& knobValue) {
51 return clientKnobCollection.trySetKnob(knobName, knobValue) || knobValue.visitSetKnob(knobName, serverKnobs);

Callers

nothing calls this directly

Calls 2

presentMethod · 0.45
parseKnobValueMethod · 0.45

Tested by

no test coverage detected