You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by "GehaFearless (via GitHub)" <gi...@apache.org> on 2023/05/06 02:37:37 UTC

[GitHub] [incubator-pegasus] GehaFearless commented on a diff in pull request #1464: feat(FQDN): Implemention of struct dns_resolver

GehaFearless commented on code in PR #1464:
URL: https://github.com/apache/incubator-pegasus/pull/1464#discussion_r1186599182


##########
src/runtime/rpc/rpc_host_port.cpp:
##########
@@ -113,4 +146,50 @@ void host_port::assign_group(const char *name)
     _group_host_port->add_ref();
 }
 
+error_s host_port::resolve_addresses(std::vector<rpc_address> &addresses) const
+{
+    CHECK(addresses.empty(), "");
+
+    switch (type()) {
+    case HOST_TYPE_INVALID:
+        return error_s::make(dsn::ERR_INVALID_STATE, "invalid host_port type: HOST_TYPE_INVALID");
+    case HOST_TYPE_GROUP:
+        return error_s::make(dsn::ERR_INVALID_STATE, "invalid host_port type: HOST_TYPE_GROUP");
+    case HOST_TYPE_IPV4:
+        break;
+    }

Review Comment:
   `type() ` return enum include figure,not clearly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org