forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generic_factory_context.cc
31 lines (25 loc) · 1.26 KB
/
generic_factory_context.cc
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
#include "source/server/generic_factory_context.h"
namespace Envoy {
namespace Server {
GenericFactoryContextImpl::GenericFactoryContextImpl(
Server::Configuration::ServerFactoryContext& server_context,
ProtobufMessage::ValidationVisitor& validation_visitor)
: server_context_(server_context), validation_visitor_(validation_visitor),
scope_(server_context.serverScope()), init_manager_(server_context.initManager()) {}
GenericFactoryContextImpl::GenericFactoryContextImpl(
Server::Configuration::GenericFactoryContext& generic_context)
: server_context_(generic_context.serverFactoryContext()),
validation_visitor_(generic_context.messageValidationVisitor()),
scope_(generic_context.scope()), init_manager_(generic_context.initManager()) {}
// Server::Configuration::GenericFactoryContext
Server::Configuration::ServerFactoryContext&
GenericFactoryContextImpl::serverFactoryContext() const {
return server_context_;
}
ProtobufMessage::ValidationVisitor& GenericFactoryContextImpl::messageValidationVisitor() const {
return validation_visitor_;
}
Stats::Scope& GenericFactoryContextImpl::scope() { return scope_; }
Init::Manager& GenericFactoryContextImpl::initManager() { return init_manager_; }
} // namespace Server
} // namespace Envoy