proto.proto 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. syntax = "proto3";
  2. option go_package = "github.com/mhaya/net/proto/proto;mhayaProto";
  3. package mhayaProto;
  4. message I32 {
  5. int32 value = 1;
  6. }
  7. // member data
  8. message Member {
  9. string nodeId = 1; // node id
  10. string nodeType = 2; // node type
  11. string address = 3; // rpc ip address
  12. map<string, string> settings = 4; // node settings data
  13. //map<string, int32> routes = 5; // route list key:route name,value:status 0.enable 1.disable
  14. }
  15. // member list data
  16. message MemberList {
  17. repeated Member list = 1;
  18. }
  19. // cross node response data
  20. message Response {
  21. int32 code = 1; // message code
  22. bytes data = 2; // message data
  23. }
  24. message ClusterPacket {
  25. int64 buildTime = 1;
  26. string sourcePath = 2;
  27. string targetPath = 3;
  28. string funcName = 4;
  29. bytes argBytes = 5;
  30. Session session = 6;
  31. }
  32. message Session {
  33. string sid = 1; // session unique id
  34. int64 uid = 2; // user id
  35. string agentPath = 3; // frontend actor agent path
  36. string ip = 4; // ip address
  37. uint32 mid = 5; // message id build by client
  38. map<string, string> data = 7; // extend data
  39. }
  40. message PomeloResponse {
  41. string sid = 1;
  42. uint32 mid = 2;
  43. bytes data = 3;
  44. int32 code = 4;
  45. }
  46. message PomeloPush {
  47. string sid = 1;
  48. string route = 2;
  49. bytes data = 3;
  50. }
  51. message PomeloKick {
  52. string sid = 1;
  53. int64 uid = 2;
  54. bytes reason = 3;
  55. bool close = 4;
  56. }
  57. message PomeloBroadcastPush {
  58. repeated int64 uidList = 1; // broadcast the uid list
  59. bool allUID = 2; // broadcast all uid
  60. string route = 3; // route
  61. bytes data = 4; // data
  62. }