Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/extensions/retry/host/previous_hosts/v3/previous_hosts.pb.validate.h" 4 : #include "envoy/upstream/retry.h" 5 : 6 : #include "source/extensions/retry/host/previous_hosts/previous_hosts.h" 7 : 8 : namespace Envoy { 9 : namespace Extensions { 10 : namespace Retry { 11 : namespace Host { 12 : 13 : class PreviousHostsRetryPredicateFactory : public Upstream::RetryHostPredicateFactory { 14 : public: 15 : Upstream::RetryHostPredicateSharedPtr createHostPredicate(const Protobuf::Message&, 16 0 : uint32_t) override { 17 0 : return std::make_shared<PreviousHostsRetryPredicate>(); 18 0 : } 19 : 20 38 : std::string name() const override { return "envoy.retry_host_predicates.previous_hosts"; } 21 : 22 1 : ProtobufTypes::MessagePtr createEmptyConfigProto() override { 23 1 : return std::make_unique< 24 1 : envoy::extensions::retry::host::previous_hosts::v3::PreviousHostsPredicate>(); 25 1 : } 26 : }; 27 : 28 : } // namespace Host 29 : } // namespace Retry 30 : } // namespace Extensions 31 : } // namespace Envoy