Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/brpc/server_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
#define BRPC_SERVER_NODE_H

#include <string>
#include <unordered_map>
#include "butil/endpoint.h"

namespace brpc {

// Representing a server inside a NamingService.
struct ServerNode {
ServerNode() {}
typedef std::unordered_map<std::string, std::string> MetaMap;

ServerNode() = default;

explicit ServerNode(const butil::EndPoint& pt) : addr(pt) {}

Expand All @@ -39,6 +42,7 @@ struct ServerNode {

butil::EndPoint addr;
std::string tag;
MetaMap meta_map;
};

inline bool operator<(const ServerNode& n1, const ServerNode& n2)
Expand Down