LCOV - code coverage report
Current view: top level - envoy/grpc - google_grpc_creds.h (source / functions) Hit Total Coverage
Test: coverage.dat Lines: 1 2 50.0 %
Date: 2024-01-05 06:35:25 Functions: 1 2 50.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <memory>
       4             : 
       5             : #include "envoy/api/api.h"
       6             : #include "envoy/common/pure.h"
       7             : #include "envoy/config/core/v3/grpc_service.pb.h"
       8             : #include "envoy/config/typed_config.h"
       9             : 
      10             : #include "grpcpp/grpcpp.h"
      11             : 
      12             : namespace Envoy {
      13             : namespace Grpc {
      14             : 
      15             : /**
      16             :  * Interface for all Google gRPC credentials factories.
      17             :  */
      18             : class GoogleGrpcCredentialsFactory : public Config::UntypedFactory {
      19             : public:
      20           0 :   ~GoogleGrpcCredentialsFactory() override = default;
      21             : 
      22             :   /**
      23             :    * Get a ChannelCredentials to be used for authentication of a gRPC channel.
      24             :    *
      25             :    * GoogleGrpcCredentialsFactory should always return a ChannelCredentials. To use CallCredentials,
      26             :    * the ChannelCredentials can be created by using a combination of CompositeChannelCredentials and
      27             :    * CompositeCallCredentials to combine multiple credentials.
      28             :    *
      29             :    * @param grpc_service_config contains configuration options
      30             :    * @param api reference to the Api object
      31             :    * @return std::shared_ptr<grpc::ChannelCredentials> to be used to authenticate a Google gRPC
      32             :    * channel.
      33             :    */
      34             :   virtual std::shared_ptr<grpc::ChannelCredentials>
      35             :   getChannelCredentials(const envoy::config::core::v3::GrpcService& grpc_service_config,
      36             :                         Api::Api& api) PURE;
      37             : 
      38          32 :   std::string category() const override { return "envoy.grpc_credentials"; }
      39             : };
      40             : 
      41             : } // namespace Grpc
      42             : } // namespace Envoy

Generated by: LCOV version 1.15