Line data Source code
1 : #include "source/extensions/retry/host/omit_host_metadata/config.h" 2 : 3 : #include "envoy/extensions/retry/host/omit_host_metadata/v3/omit_host_metadata_config.pb.h" 4 : #include "envoy/registry/registry.h" 5 : #include "envoy/upstream/retry.h" 6 : 7 : #include "source/common/protobuf/message_validator_impl.h" 8 : 9 : namespace Envoy { 10 : namespace Extensions { 11 : namespace Retry { 12 : namespace Host { 13 : 14 : Upstream::RetryHostPredicateSharedPtr 15 0 : OmitHostsRetryPredicateFactory::createHostPredicate(const Protobuf::Message& config, uint32_t) { 16 0 : return std::make_shared<OmitHostsRetryPredicate>( 17 0 : MessageUtil::downcastAndValidate< 18 0 : const envoy::extensions::retry::host::omit_host_metadata::v3::OmitHostMetadataConfig&>( 19 0 : config, ProtobufMessage::getStrictValidationVisitor()) 20 0 : .metadata_match()); 21 0 : } 22 : 23 : REGISTER_FACTORY(OmitHostsRetryPredicateFactory, Upstream::RetryHostPredicateFactory); 24 : 25 : } // namespace Host 26 : } // namespace Retry 27 : } // namespace Extensions 28 : } // namespace Envoy