From d958ec5deecfb08c3c6006356723ecbbd658f87a Mon Sep 17 00:00:00 2001 From: gzdaijie Date: Tue, 6 Oct 2020 19:44:59 +0800 Subject: [PATCH] geerpc/day5 day6 day7: update the function description of XDial --- gee-rpc/day5-http-debug/client.go | 4 +++- gee-rpc/day6-load-balance/client.go | 4 +++- gee-rpc/day7-registry/client.go | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gee-rpc/day5-http-debug/client.go b/gee-rpc/day5-http-debug/client.go index e9b4540..795a18b 100644 --- a/gee-rpc/day5-http-debug/client.go +++ b/gee-rpc/day5-http-debug/client.go @@ -306,7 +306,9 @@ func DialHTTP(network, address string, opts ...*Option) (*Client, error) { return dialTimeout(dialHTTP, network, address, opts...) } -// XDial use a general format to represent a rpc server +// XDial calls different functions to connect to a RPC server +// according the first parameter rpcAddr. +// rpcAddr is a general format (protocol@addr) to represent a rpc server // eg, http@10.0.0.1:7001, tcp@10.0.0.1:9999, unix@/tmp/geerpc.sock func XDial(rpcAddr string, opts ...*Option) (*Client, error) { parts := strings.Split(rpcAddr, "@") diff --git a/gee-rpc/day6-load-balance/client.go b/gee-rpc/day6-load-balance/client.go index e9b4540..795a18b 100644 --- a/gee-rpc/day6-load-balance/client.go +++ b/gee-rpc/day6-load-balance/client.go @@ -306,7 +306,9 @@ func DialHTTP(network, address string, opts ...*Option) (*Client, error) { return dialTimeout(dialHTTP, network, address, opts...) } -// XDial use a general format to represent a rpc server +// XDial calls different functions to connect to a RPC server +// according the first parameter rpcAddr. +// rpcAddr is a general format (protocol@addr) to represent a rpc server // eg, http@10.0.0.1:7001, tcp@10.0.0.1:9999, unix@/tmp/geerpc.sock func XDial(rpcAddr string, opts ...*Option) (*Client, error) { parts := strings.Split(rpcAddr, "@") diff --git a/gee-rpc/day7-registry/client.go b/gee-rpc/day7-registry/client.go index e9b4540..795a18b 100644 --- a/gee-rpc/day7-registry/client.go +++ b/gee-rpc/day7-registry/client.go @@ -306,7 +306,9 @@ func DialHTTP(network, address string, opts ...*Option) (*Client, error) { return dialTimeout(dialHTTP, network, address, opts...) } -// XDial use a general format to represent a rpc server +// XDial calls different functions to connect to a RPC server +// according the first parameter rpcAddr. +// rpcAddr is a general format (protocol@addr) to represent a rpc server // eg, http@10.0.0.1:7001, tcp@10.0.0.1:9999, unix@/tmp/geerpc.sock func XDial(rpcAddr string, opts ...*Option) (*Client, error) { parts := strings.Split(rpcAddr, "@")