forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
transport_socket_config_impl.h
58 lines (43 loc) · 2.03 KB
/
transport_socket_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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#pragma once
#include "envoy/server/transport_socket_config.h"
#include "envoy/stats/scope.h"
namespace Envoy {
namespace Server {
namespace Configuration {
/**
* Implementation of TransportSocketFactoryContext.
*/
class TransportSocketFactoryContextImpl : public TransportSocketFactoryContext {
public:
TransportSocketFactoryContextImpl(Ssl::ContextManager& context_manager, Stats::Scope& stats_scope,
Upstream::ClusterManager& cm,
const LocalInfo::LocalInfo& local_info,
Event::Dispatcher& dispatcher,
Envoy::Runtime::RandomGenerator& random, Stats::Store& stats)
: context_manager_(context_manager), stats_scope_(stats_scope), cluster_manager_(cm),
local_info_(local_info), dispatcher_(dispatcher), random_(random), stats_(stats) {}
Ssl::ContextManager& sslContextManager() override { return context_manager_; }
Stats::Scope& statsScope() const override { return stats_scope_; }
Secret::SecretManager& secretManager() override {
return cluster_manager_.clusterManagerFactory().secretManager();
}
Upstream::ClusterManager& clusterManager() override { return cluster_manager_; }
const LocalInfo::LocalInfo& localInfo() override { return local_info_; }
Event::Dispatcher& dispatcher() override { return dispatcher_; }
Envoy::Runtime::RandomGenerator& random() override { return random_; }
Stats::Store& stats() override { return stats_; }
void setInitManager(Init::Manager& init_manager) override { init_manager_ = &init_manager; }
Init::Manager* initManager() override { return init_manager_; }
private:
Ssl::ContextManager& context_manager_;
Stats::Scope& stats_scope_;
Upstream::ClusterManager& cluster_manager_;
const LocalInfo::LocalInfo& local_info_;
Event::Dispatcher& dispatcher_;
Envoy::Runtime::RandomGenerator& random_;
Stats::Store& stats_;
Init::Manager* init_manager_{};
};
} // namespace Configuration
} // namespace Server
} // namespace Envoy