LCOV - code coverage report
Current view: top level - source/common/matcher - value_input_matcher.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 0 7 0.0 %
Date: 2024-01-05 06:35:25 Functions: 0 4 0.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/matcher/matcher.h"
       4             : 
       5             : #include "source/common/common/matchers.h"
       6             : 
       7             : namespace Envoy {
       8             : namespace Matcher {
       9             : 
      10             : template <class StringMatcherType>
      11             : class StringInputMatcher : public InputMatcher, Logger::Loggable<Logger::Id::matcher> {
      12             : public:
      13           0 :   explicit StringInputMatcher(const StringMatcherType& matcher) : matcher_(matcher) {}
      14             : 
      15           0 :   bool match(const MatchingDataType& input) override {
      16           0 :     if (absl::holds_alternative<std::string>(input)) {
      17           0 :       return matcher_.match(absl::get<std::string>(input));
      18           0 :     }
      19             :     // Return false when input is empty.(i.e., input is absl::monostate).
      20           0 :     return false;
      21           0 :   }
      22             : 
      23             : private:
      24             :   const Matchers::StringMatcherImpl<StringMatcherType> matcher_;
      25             : };
      26             : 
      27             : } // namespace Matcher
      28             : } // namespace Envoy

Generated by: LCOV version 1.15