1
#include "source/common/json/json_rpc_parser_config.h"
2

            
3
namespace Envoy {
4
namespace Json {
5

            
6
void JsonRpcParserConfig::addMethodConfig(absl::string_view method,
7
736
                                          std::vector<AttributeExtractionRule> fields) {
8
736
  method_fields_[std::string(method)] = std::move(fields);
9
736
}
10

            
11
const std::vector<AttributeExtractionRule>
12
199
JsonRpcParserConfig::getFieldsForMethod(const std::string& method) const {
13
199
  auto it = method_fields_.find(method);
14
199
  return (it != method_fields_.end()) ? it->second : std::vector<AttributeExtractionRule>{};
15
199
}
16

            
17
} // namespace Json
18
} // namespace Envoy