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

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/config/core/v3/base.pb.h"
       4             : #include "envoy/config/endpoint/v3/endpoint_components.pb.h"
       5             : 
       6             : #include "source/common/protobuf/utility.h"
       7             : 
       8             : namespace Envoy {
       9             : namespace Upstream {
      10             : 
      11             : using LocalityEndpointTuple = std::tuple<const envoy::config::core::v3::Locality&,
      12             :                                          const envoy::config::endpoint::v3::LbEndpoint&>;
      13             : struct LocalityEndpointHash {
      14           0 :   size_t operator()(const LocalityEndpointTuple& values) const {
      15           0 :     const auto locality_hash = MessageUtil::hash(std::get<0>(values));
      16           0 :     const auto endpoint_hash = MessageUtil::hash(std::get<1>(values));
      17           0 :     return locality_hash ^ endpoint_hash;
      18           0 :   }
      19             : };
      20             : 
      21             : struct LocalityEndpointEqualTo {
      22           0 :   bool operator()(const LocalityEndpointTuple& lhs, const LocalityEndpointTuple& rhs) const {
      23           0 :     return Protobuf::util::MessageDifferencer::Equals(std::get<0>(lhs), std::get<0>(rhs)) &&
      24           0 :            Protobuf::util::MessageDifferencer::Equals(std::get<1>(lhs), std::get<1>(rhs));
      25           0 :   }
      26             : };
      27             : 
      28             : } // namespace Upstream
      29             : } // namespace Envoy

Generated by: LCOV version 1.15