1
#pragma once
2

            
3
#include "envoy/api/api.h"
4
#include "envoy/config/bootstrap/v3/bootstrap.pb.h"
5
#include "envoy/event/timer.h"
6
#include "envoy/filesystem/filesystem.h"
7

            
8
#include "source/common/api/api_impl.h"
9

            
10
namespace Envoy {
11
namespace Api {
12

            
13
/**
14
 * Config-validation-only implementation of Api::Api. Delegates to Api::Impl,
15
 * except for allocateDispatcher() which sets up a ValidationDispatcher.
16
 */
17
class ValidationImpl : public Impl {
18
public:
19
  ValidationImpl(Thread::ThreadFactory& thread_factory, Stats::Store& stats_store,
20
                 Event::TimeSystem& time_system, Filesystem::Instance& file_system,
21
                 Random::RandomGenerator& random_generator,
22
                 const envoy::config::bootstrap::v3::Bootstrap& bootstrap,
23
                 const ProcessContextOptRef& process_context = absl::nullopt);
24

            
25
  Event::DispatcherPtr allocateDispatcher(const std::string& name) override;
26
  Event::DispatcherPtr allocateDispatcher(const std::string& name,
27
                                          const Event::ScaledRangeTimerManagerFactory&) override;
28
  Event::DispatcherPtr allocateDispatcher(const std::string& name,
29
                                          Buffer::WatermarkFactoryPtr&& watermark_factory) override;
30

            
31
private:
32
  Event::TimeSystem& time_system_;
33
};
34

            
35
} // namespace Api
36
} // namespace Envoy