/proc/self/cwd/source/common/api/api_impl.cc
Line | Count | Source |
1 | | #include "source/common/api/api_impl.h" |
2 | | |
3 | | #include <chrono> |
4 | | #include <string> |
5 | | |
6 | | #include "envoy/config/bootstrap/v3/bootstrap.pb.h" |
7 | | |
8 | | #include "source/common/common/thread.h" |
9 | | #include "source/common/event/dispatcher_impl.h" |
10 | | |
11 | | namespace Envoy { |
12 | | namespace Api { |
13 | | |
14 | | Impl::Impl(Thread::ThreadFactory& thread_factory, Stats::Store& store, |
15 | | Event::TimeSystem& time_system, Filesystem::Instance& file_system, |
16 | | Random::RandomGenerator& random_generator, |
17 | | const envoy::config::bootstrap::v3::Bootstrap& bootstrap, |
18 | | const ProcessContextOptRef& process_context, |
19 | | Buffer::WatermarkFactorySharedPtr watermark_factory) |
20 | | : thread_factory_(thread_factory), store_(store), time_system_(time_system), |
21 | | file_system_(file_system), random_generator_(random_generator), bootstrap_(bootstrap), |
22 | 77.1k | process_context_(process_context), watermark_factory_(std::move(watermark_factory)) {} |
23 | | |
24 | 18.4k | Event::DispatcherPtr Impl::allocateDispatcher(const std::string& name) { |
25 | 18.4k | return std::make_unique<Event::DispatcherImpl>(name, *this, time_system_, watermark_factory_); |
26 | 18.4k | } |
27 | | |
28 | | Event::DispatcherPtr |
29 | | Impl::allocateDispatcher(const std::string& name, |
30 | 5.33k | const Event::ScaledRangeTimerManagerFactory& scaled_timer_factory) { |
31 | 5.33k | return std::make_unique<Event::DispatcherImpl>(name, *this, time_system_, scaled_timer_factory, |
32 | 5.33k | watermark_factory_); |
33 | 5.33k | } |
34 | | |
35 | | Event::DispatcherPtr Impl::allocateDispatcher(const std::string& name, |
36 | 2.64k | Buffer::WatermarkFactoryPtr&& factory) { |
37 | 2.64k | return std::make_unique<Event::DispatcherImpl>(name, *this, time_system_, std::move(factory)); |
38 | 2.64k | } |
39 | | |
40 | | } // namespace Api |
41 | | } // namespace Envoy |