1
#pragma once
2

            
3
#include "source/extensions/router/cluster_specifiers/matcher/matcher_cluster_specifier.h"
4

            
5
namespace Envoy {
6
namespace Extensions {
7
namespace Router {
8
namespace Matcher {
9

            
10
class MatcherClusterSpecifierPluginFactoryConfig
11
    : public Envoy::Router::ClusterSpecifierPluginFactoryConfig {
12
public:
13
10
  MatcherClusterSpecifierPluginFactoryConfig() = default;
14
  /**
15
   * Creates a matcher-based cluster specifier plugin.
16
   * @param config the matcher cluster specifier configuration
17
   * @param context the factory context for accessing cluster manager and other services
18
   * @return shared pointer to the created cluster specifier plugin
19
   */
20
  Envoy::Router::ClusterSpecifierPluginSharedPtr
21
  createClusterSpecifierPlugin(const Protobuf::Message& config,
22
                               Server::Configuration::ServerFactoryContext&) override;
23

            
24
5
  ProtobufTypes::MessagePtr createEmptyConfigProto() override {
25
5
    return std::make_unique<MatcherClusterSpecifierConfigProto>();
26
5
  }
27

            
28
9
  std::string name() const override { return "envoy.router.cluster_specifier_plugin.matcher"; }
29
};
30

            
31
} // namespace Matcher
32
} // namespace Router
33
} // namespace Extensions
34
} // namespace Envoy