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

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "envoy/network/connection.h"
       4             : #include "envoy/network/hash_policy.h"
       5             : #include "envoy/type/v3/hash_policy.pb.h"
       6             : 
       7             : #include "source/common/common/hash.h"
       8             : 
       9             : namespace Envoy {
      10             : namespace Network {
      11             : /**
      12             :  * Implementation of HashPolicy that reads from the proto TCP proxy config.
      13             :  */
      14             : class HashPolicyImpl : public Network::HashPolicy {
      15             : public:
      16             :   explicit HashPolicyImpl(const absl::Span<const envoy::type::v3::HashPolicy* const>& hash_policy);
      17             : 
      18             :   // Network::HashPolicy
      19             :   absl::optional<uint64_t> generateHash(const Network::Connection& connection) const override;
      20             : 
      21             :   class HashMethod {
      22             :   public:
      23           0 :     virtual ~HashMethod() = default;
      24             :     virtual absl::optional<uint64_t> evaluate(const Network::Connection& connection) const PURE;
      25             :   };
      26             : 
      27             :   using HashMethodPtr = std::unique_ptr<HashMethod>;
      28             : 
      29             : private:
      30             :   HashMethodPtr hash_impl_;
      31             : };
      32             : } // namespace Network
      33             : } // namespace Envoy

Generated by: LCOV version 1.15