-
Notifications
You must be signed in to change notification settings - Fork 5.5k
http3: support Http3Options for downstream #15753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
0898c3e
c70d7cc
53695e7
215f63e
f8b7f03
6dd9ca1
720d792
85b7003
f21f032
e55bd8a
f35ef44
5004e70
511e79a
c255c5d
c860abf
c4e80a1
7f01805
5577f48
5d6362e
255c01b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -995,6 +995,11 @@ class ClusterInfo { | |||||
| */ | ||||||
| virtual Http::Http2::CodecStats& http2CodecStats() const PURE; | ||||||
|
|
||||||
| /** | ||||||
| * @return the Http2 Codec Stats. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||||||
| */ | ||||||
| virtual Http::Http3::CodecStats& http3CodecStats() const PURE; | ||||||
|
|
||||||
| protected: | ||||||
| /** | ||||||
| * Invoked by extensionProtocolOptionsTyped. | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #pragma once | ||
|
|
||
| #include "envoy/stats/scope.h" | ||
| #include "envoy/stats/stats_macros.h" | ||
|
|
||
| #include "common/common/thread.h" | ||
|
|
||
| namespace Envoy { | ||
| namespace Http { | ||
| namespace Http3 { | ||
|
|
||
| /** | ||
| * All stats for the HTTP/3 codec. @see stats_macros.h | ||
| * TODO(danzh) populate all of them in codec. | ||
| */ | ||
| #define ALL_HTTP3_CODEC_STATS(COUNTER, GAUGE) \ | ||
| COUNTER(dropped_headers_with_underscores) \ | ||
| COUNTER(header_overflow) \ | ||
| COUNTER(requests_rejected_with_underscores_in_headers) \ | ||
| COUNTER(rx_messaging_error) \ | ||
| COUNTER(rx_reset) \ | ||
| COUNTER(trailers) \ | ||
| COUNTER(tx_reset) \ | ||
| GAUGE(streams_active, Accumulate) | ||
|
|
||
| /** | ||
| * Wrapper struct for the HTTP/3 codec stats. @see stats_macros.h | ||
| */ | ||
| struct CodecStats { | ||
| using AtomicPtr = Thread::AtomicPtr<CodecStats, Thread::AtomicPtrAllocMode::DeleteOnDestruct>; | ||
|
|
||
| static CodecStats& atomicGet(AtomicPtr& ptr, Stats::Scope& scope) { | ||
| return *ptr.get([&scope]() -> CodecStats* { | ||
| return new CodecStats{ALL_HTTP3_CODEC_STATS(POOL_COUNTER_PREFIX(scope, "http3."), | ||
| POOL_GAUGE_PREFIX(scope, "http3."))}; | ||
| }); | ||
| } | ||
|
|
||
| ALL_HTTP3_CODEC_STATS(GENERATE_COUNTER_STRUCT, GENERATE_GAUGE_STRUCT) | ||
| }; | ||
|
|
||
| } // namespace Http3 | ||
| } // namespace Http | ||
| } // namespace Envoy |
Uh oh!
There was an error while loading. Please reload this page.