1
#include "source/common/router/debug_config.h"
2

            
3
#include "envoy/registry/registry.h"
4

            
5
namespace Envoy {
6
namespace Router {
7

            
8
constexpr absl::string_view DebugConfigKey = "envoy.router.debug_config";
9

            
10
46806
absl::string_view DebugConfig::key() { return DebugConfigKey; }
11

            
12
1314
std::string DebugConfigFactory::name() const { return std::string(DebugConfigKey); }
13

            
14
std::unique_ptr<StreamInfo::FilterState::Object>
15
3
DebugConfigFactory::createFromBytes(absl::string_view data) const {
16
3
  return std::make_unique<DebugConfig>(data == "true");
17
3
}
18

            
19
REGISTER_FACTORY(DebugConfigFactory, StreamInfo::FilterState::ObjectFactory);
20

            
21
} // namespace Router
22
} // namespace Envoy