mirror of
https://github.com/geektutu/7days-golang.git
synced 2024-04-21 12:32:11 +00:00
geerpc/day5 day6 day7: update the function description of XDial
This commit is contained in:
@@ -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, "@")
|
||||
|
||||
@@ -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, "@")
|
||||
|
||||
@@ -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, "@")
|
||||
|
||||
Reference in New Issue
Block a user