|
|
@ -6,9 +6,13 @@ import ( |
|
|
|
|
|
|
|
func rpc_server_conn(url ...string) (*ProductServiceClient, error) { |
|
|
|
|
|
|
|
var rpc_url string = "127.0.0.1:" + conf.PRODUCT_RPC_PORT |
|
|
|
var rpc_url string |
|
|
|
if len(url) > 0 && url[0] != "" { |
|
|
|
rpc_url = url[0] |
|
|
|
} else if conf.PRODUCT_RPC_URL != "" { |
|
|
|
rpc_url = conf.PRODUCT_RPC_URL |
|
|
|
} else { |
|
|
|
rpc_url = "127.0.0.1:" + conf.PRODUCT_RPC_PORT |
|
|
|
} |
|
|
|
conn, _, err := DialProductService("tcp", rpc_url) |
|
|
|
if err != nil { |
|
|
|