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 DogStatsd {
11

            
12
// DogStatsD compatible statsd sink
13
constexpr char DogStatsdName[] = "envoy.stat_sinks.dog_statsd";
14

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

            
25
  ProtobufTypes::MessagePtr createEmptyConfigProto() override;
26

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

            
30
} // namespace DogStatsd
31
} // namespace StatSinks
32
} // namespace Extensions
33
} // namespace Envoy