package msgrpc import ( "git.tetele.net/tgo/conf" ) const DES_KEY = "msgsirpc" type Req struct { SiteId string Dbname string } type MsgBody struct { Req Platform string BusinessId string Domainname string Type string Data string OrderSn string Memo string } func rpc_server_conn(url ...string) (*MsgRpcServiceClient, error) { var wx_rpc_url string = "127.0.0.1:" + conf.MSG_RPC_PORT if len(url) > 0 && url[0] != "" { wx_rpc_url = url[0] } conn, _, err := DialMsgRpcService("tcp", wx_rpc_url) if err != nil { return nil, err } return conn, nil }