-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
config: making protocol config explicit #14362
Changes from 4 commits
ae3d0c1
fdcf274
54047b2
79f0808
73c874e
9e3737d
8f399e2
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.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
#include "envoy/server/filter_config.h" | ||
|
||
#include "common/common/logger.h" | ||
#include "common/protobuf/message_validator_impl.h" | ||
|
||
namespace Envoy { | ||
namespace Extensions { | ||
|
@@ -49,6 +50,7 @@ class ProtocolOptionsConfigFactory : public Server::Configuration::ProtocolOptio | |
Server::Configuration::ProtocolOptionsFactoryContext&) override { | ||
const envoy::extensions::upstreams::http::v3::HttpProtocolOptions& typed_config = | ||
*dynamic_cast<const envoy::extensions::upstreams::http::v3::HttpProtocolOptions*>(&config); | ||
MessageUtil::validate(typed_config, ProtobufMessage::getStrictValidationVisitor()); | ||
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. nit: use |
||
return std::make_shared<ProtocolOptionsConfigImpl>(typed_config); | ||
} | ||
std::string category() const override { return "envoy.upstream_options"; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are in here can you potentially make it more clear the http2 needs to be used for gRPC? I think that would help guide people in the right way even if we don't want to do something extreme like
http2_and_grpc_protocol_options
or something like that, which we probably don't want to do because h3 can be used with gRPC. So maybe just some comments/docs?