消息服务RPC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
578 B

2 years ago
2 years ago
2 years ago
  1. package msgrpc
  2. const DES_KEY = "msgsirpc"
  3. type Req struct {
  4. SiteId string
  5. Dbname string
  6. }
  7. type MsgBody struct {
  8. Req
  9. Platform string
  10. BusinessId string
  11. Domainname string
  12. Type string
  13. Data string
  14. OrderSn string
  15. Memo string
  16. }
  17. type MsgSend struct {
  18. Id string
  19. }
  20. func rpc_server_conn(url ...string) (*MsgRpcServiceClient, error) {
  21. var wx_rpc_url string = "127.0.0.1:7954"
  22. if len(url) > 0 && url[0] != "" {
  23. wx_rpc_url = url[0]
  24. }
  25. conn, _, err := DialMsgRpcService("tcp", wx_rpc_url)
  26. if err != nil {
  27. return nil, err
  28. }
  29. return conn, nil
  30. }