1
#pragma once
2

            
3
#include "envoy/server/instance.h"
4

            
5
#include "source/server/configuration_impl.h"
6

            
7
namespace Envoy {
8
namespace Extensions {
9
namespace StatSinks {
10
namespace Statsd {
11

            
12
// Statsd sink
13
constexpr char StatsdName[] = "envoy.stat_sinks.statsd";
14

            
15
/**
16
 * Config registration for the tcp statsd sink. @see StatsSinkFactory.
17
 */
18
class StatsdSinkFactory : Logger::Loggable<Logger::Id::config>,
19
                          public Server::Configuration::StatsSinkFactory {
20
public:
21
  // StatsSinkFactory
22
  absl::StatusOr<Stats::SinkPtr>
23
  createStatsSink(const Protobuf::Message& config,
24
                  Server::Configuration::ServerFactoryContext& server) override;
25

            
26
  ProtobufTypes::MessagePtr createEmptyConfigProto() override;
27

            
28
  std::string name() const override;
29
};
30

            
31
DECLARE_FACTORY(StatsdSinkFactory);
32

            
33
} // namespace Statsd
34
} // namespace StatSinks
35
} // namespace Extensions
36
} // namespace Envoy