LCOV - code coverage report
Current view: top level - source/extensions/matching/network/application_protocol - config.cc (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 0 8 0.0 %
Date: 2024-01-05 06:35:25 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "source/extensions/matching/network/application_protocol/config.h"
       2             : 
       3             : #include "envoy/http/filter.h"
       4             : #include "envoy/registry/registry.h"
       5             : 
       6             : #include "absl/strings/str_cat.h"
       7             : 
       8             : namespace Envoy {
       9             : namespace Network {
      10             : namespace Matching {
      11             : 
      12           0 : Matcher::DataInputGetResult ApplicationProtocolInput::get(const MatchingData& data) const {
      13           0 :   const auto& protocols = data.socket().requestedApplicationProtocols();
      14           0 :   if (!protocols.empty()) {
      15           0 :     return {Matcher::DataInputGetResult::DataAvailability::AllDataAvailable,
      16           0 :             absl::StrCat("'", absl::StrJoin(protocols, "','"), "'")};
      17           0 :   }
      18           0 :   return {Matcher::DataInputGetResult::DataAvailability::AllDataAvailable, absl::monostate()};
      19           0 : }
      20             : 
      21             : REGISTER_FACTORY(ApplicationProtocolInputFactory, Matcher::DataInputFactory<MatchingData>);
      22             : 
      23             : } // namespace Matching
      24             : } // namespace Network
      25             : } // namespace Envoy

Generated by: LCOV version 1.15