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

Function decodeExcludedLocalityKey

fdbclient/SystemData.cpp:876–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

874const KeyRef excludedLocalityPrefix = excludedLocalityKeys.begin;
875const KeyRef excludedLocalityVersionKey = LiteralStringRef("\xff/conf/excluded_locality");
876std::string decodeExcludedLocalityKey(KeyRef const& key) {
877 ASSERT(key.startsWith(excludedLocalityPrefix));
878 return key.removePrefix(excludedLocalityPrefix).toString();
879}
880std::string encodeExcludedLocalityKey(std::string const& locality) {
881 return excludedLocalityPrefix.toString() + locality;
882}

Calls 3

startsWithMethod · 0.45
toStringMethod · 0.45
removePrefixMethod · 0.45

Tested by

no test coverage detected