forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resource_monitor_config_impl.h
36 lines (27 loc) · 1.08 KB
/
resource_monitor_config_impl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "envoy/server/resource_monitor_config.h"
namespace Envoy {
namespace Server {
namespace Configuration {
class ResourceMonitorFactoryContextImpl : public ResourceMonitorFactoryContext {
public:
ResourceMonitorFactoryContextImpl(Event::Dispatcher& dispatcher, const Server::Options& options,
Api::Api& api,
ProtobufMessage::ValidationVisitor& validation_visitor)
: dispatcher_(dispatcher), options_(options), api_(api),
validation_visitor_(validation_visitor) {}
Event::Dispatcher& mainThreadDispatcher() override { return dispatcher_; }
const Server::Options& options() override { return options_; }
Api::Api& api() override { return api_; }
ProtobufMessage::ValidationVisitor& messageValidationVisitor() override {
return validation_visitor_;
}
private:
Event::Dispatcher& dispatcher_;
const Server::Options& options_;
Api::Api& api_;
ProtobufMessage::ValidationVisitor& validation_visitor_;
};
} // namespace Configuration
} // namespace Server
} // namespace Envoy