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

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

            
23
  ProtobufTypes::MessagePtr createEmptyConfigProto() override;
24

            
25
  std::string name() const override;
26
};
27

            
28
DECLARE_FACTORY(GraphiteStatsdSinkFactory);
29

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