1
#include "source/extensions/router/cluster_specifiers/lua/config.h"
2

            
3
namespace Envoy {
4
namespace Extensions {
5
namespace Router {
6
namespace Lua {
7

            
8
Envoy::Router::ClusterSpecifierPluginSharedPtr
9
LuaClusterSpecifierPluginFactoryConfig::createClusterSpecifierPlugin(
10
2
    const Protobuf::Message& config, Server::Configuration::ServerFactoryContext& context) {
11

            
12
2
  const auto& typed_config = dynamic_cast<const LuaClusterSpecifierConfigProto&>(config);
13
2
  auto cluster_config = std::make_shared<LuaClusterSpecifierConfig>(typed_config, context);
14
2
  return std::make_shared<LuaClusterSpecifierPlugin>(cluster_config);
15
2
}
16

            
17
REGISTER_FACTORY(LuaClusterSpecifierPluginFactoryConfig,
18
                 Envoy::Router::ClusterSpecifierPluginFactoryConfig);
19

            
20
} // namespace Lua
21
} // namespace Router
22
} // namespace Extensions
23
} // namespace Envoy