Go to the documentation of this file.
19 #ifndef GRPC_CORE_LIB_RESOLVER_SERVER_ADDRESS_H
20 #define GRPC_CORE_LIB_RESOLVER_SERVER_ADDRESS_H
32 #include "absl/memory/memory.h"
63 virtual std::unique_ptr<AttributeInterface>
Copy()
const = 0;
74 std::map<
const char*, std::unique_ptr<AttributeInterface>>
78 std::map<
const char*, std::unique_ptr<AttributeInterface>>
103 std::unique_ptr<AttributeInterface>
value)
const;
113 std::map<const char*, std::unique_ptr<AttributeInterface>>
attributes_;
133 std::unique_ptr<AttributeInterface>
Copy()
const override {
134 return absl::make_unique<ServerAddressWeightAttribute>(
weight_);
137 int Cmp(
const AttributeInterface* other)
const override {
138 const auto* other_locality_attr =
ServerAddress & operator=(const ServerAddress &other)
bool operator==(const ServerAddress &other) const
virtual std::unique_ptr< AttributeInterface > Copy() const =0
ServerAddressWeightAttribute(uint32_t weight)
const grpc_resolved_address & address() const
virtual int Cmp(const AttributeInterface *other) const =0
const grpc_channel_args * args() const
int Cmp(const AttributeInterface *other) const override
void grpc_channel_args_destroy(grpc_channel_args *a)
ServerAddress WithAttribute(const char *key, std::unique_ptr< AttributeInterface > value) const
std::unique_ptr< AttributeInterface > Copy() const override
ServerAddress(const grpc_resolved_address &address, grpc_channel_args *args, std::map< const char *, std::unique_ptr< AttributeInterface >> attributes={})
std::vector< ServerAddress > ServerAddressList
static const char * kServerAddressWeightAttributeKey
int Cmp(const ServerAddress &other) const
int QsortCompare(const T &a, const T &b)
std::string ToString() const
std::map< const char *, std::unique_ptr< AttributeInterface > > attributes_
std::string ToString() const override
grpc_channel_args * args_
const AttributeInterface * GetAttribute(const char *key) const
grpc_resolved_address address_
virtual std::string ToString() const =0
virtual ~AttributeInterface()=default
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:16