/proc/self/cwd/source/common/http/context_impl.h
Line | Count | Source |
1 | | #pragma once |
2 | | |
3 | | #include "envoy/http/context.h" |
4 | | |
5 | | #include "source/common/http/codes.h" |
6 | | #include "source/common/http/user_agent.h" |
7 | | |
8 | | namespace Envoy { |
9 | | namespace Http { |
10 | | |
11 | | /** |
12 | | * Captures http-related structures with cardinality of one per server. |
13 | | */ |
14 | | class ContextImpl : public Context { |
15 | | public: |
16 | | explicit ContextImpl(Stats::SymbolTable& symbol_table); |
17 | 27.7k | ~ContextImpl() override = default; |
18 | | |
19 | 1.01k | const envoy::config::trace::v3::Tracing& defaultTracingConfig() override { |
20 | 1.01k | return default_tracing_config_; |
21 | 1.01k | } |
22 | | |
23 | 2.74k | CodeStats& codeStats() override { return code_stats_; } |
24 | | |
25 | 4.40k | void setDefaultTracingConfig(const envoy::config::trace::v3::Tracing& tracing_config) { |
26 | 4.40k | default_tracing_config_ = tracing_config; |
27 | 4.40k | } |
28 | | |
29 | 5.61k | const UserAgentContext& userAgentContext() const override { return user_agent_context_; } |
30 | 2.89k | const Stats::StatName& asyncClientStatPrefix() const override { |
31 | 2.89k | return async_client_stat_prefix_; |
32 | 2.89k | } |
33 | | |
34 | | private: |
35 | | CodeStatsImpl code_stats_; |
36 | | UserAgentContext user_agent_context_; |
37 | | const Stats::StatName async_client_stat_prefix_; |
38 | | envoy::config::trace::v3::Tracing default_tracing_config_; |
39 | | }; |
40 | | |
41 | | } // namespace Http |
42 | | } // namespace Envoy |