proxygen
folly::settings Namespace Reference

Namespaces

 detail
 

Classes

struct  SettingMetadata
 
class  Snapshot
 

Functions

Optional< SettingMetadatagetSettingsMeta (StringPiece settingName)
 

Function Documentation

Optional< SettingMetadata > folly::settings::getSettingsMeta ( StringPiece  settingName)
Returns
If the setting exists, returns the current settings metadata. Empty Optional otherwise.

Definition at line 53 of file Settings.cpp.

References folly::none, and folly::Range< Iter >::str().

Referenced by TEST().

53  {
54  auto mapPtr = detail::settingsMap().rlock();
55  auto it = mapPtr->find(settingName.str());
56  if (it == mapPtr->end()) {
57  return none;
58  }
59  return it->second->meta();
60 }
constexpr None none
Definition: Optional.h:87