Public Member Functions | List of all members
grpc_core::LoadBalancingPolicy::MetadataInterface Class Referenceabstract

#include <lb_policy.h>

Inheritance diagram for grpc_core::LoadBalancingPolicy::MetadataInterface:
Inheritance graph
[legend]

Public Member Functions

virtual void Add (absl::string_view key, absl::string_view value)=0
 
virtual absl::optional< absl::string_viewLookup (absl::string_view key, std::string *buffer) const =0
 
virtual std::vector< std::pair< std::string, std::string > > TestOnlyCopyToVector ()=0
 Produce a vector of metadata key/value strings for tests. More...
 
virtual ~MetadataInterface ()=default
 

Detailed Description

Interface for accessing metadata. Implemented by the client channel and used by the SubchannelPicker.

Definition at line 113 of file lb_policy.h.

Constructor & Destructor Documentation

◆ ~MetadataInterface()

virtual grpc_core::LoadBalancingPolicy::MetadataInterface::~MetadataInterface ( )
virtualdefault

Member Function Documentation

◆ Add()

virtual void grpc_core::LoadBalancingPolicy::MetadataInterface::Add ( absl::string_view  key,
absl::string_view  value 
)
pure virtual

Adds a key/value pair. Does NOT take ownership of key or value. Implementations must ensure that the key and value remain alive until the call ends. If desired, they may be allocated via CallState::Alloc().

Implemented in grpc_core::ClientChannel::LoadBalancedCall::Metadata.

◆ Lookup()

virtual absl::optional<absl::string_view> grpc_core::LoadBalancingPolicy::MetadataInterface::Lookup ( absl::string_view  key,
std::string *  buffer 
) const
pure virtual

◆ TestOnlyCopyToVector()

virtual std::vector<std::pair<std::string, std::string> > grpc_core::LoadBalancingPolicy::MetadataInterface::TestOnlyCopyToVector ( )
pure virtual

Produce a vector of metadata key/value strings for tests.

Implemented in grpc_core::ClientChannel::LoadBalancedCall::Metadata.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:36