basic-meta.proto 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright 2019 The Eggroll Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. syntax = "proto3";
  17. package com.webank.ai.eggroll.api.core;
  18. // network endpoint
  19. message Endpoint {
  20. string ip = 1; // ip address
  21. int32 port = 2; // port
  22. string hostname = 3; // host name
  23. }
  24. message Endpoints {
  25. repeated Endpoint endpoints = 1;
  26. }
  27. // general container for serialized data
  28. message Data {
  29. bool isNull = 1; // whether the data is actually 'null' (e.g. null in Java, None in python, NULL in c/c++
  30. string hostLanguage = 2; // the host language which serializes it
  31. string type = 3; // data type in host language
  32. bytes data = 4; // actual data serialized in bytes
  33. }
  34. // general container for data list
  35. message RepeatedData {
  36. repeated Data datalist = 1; // list of data
  37. }
  38. // general message for a call request
  39. message CallRequest {
  40. bool isAsync = 1; // whether the call is async. ignored in phase 1
  41. int64 timeout = 2; // in ms
  42. string command = 3; // call command. ignored in phase 1
  43. Data param = 4; // call input param
  44. }
  45. // general message for a call response
  46. // todo: merge call response with Return Status
  47. message CallResponse {
  48. ReturnStatus returnStatus = 1; // return status
  49. Data result = 2; // call result
  50. }
  51. message Job {
  52. string jobId = 1;
  53. string name = 2;
  54. }
  55. message Task {
  56. Job job = 1;
  57. int64 taskId = 2;
  58. int64 tableId = 3;
  59. }
  60. // reserved for driver async call result
  61. message Result {
  62. Task task = 1;
  63. int64 resultId = 2;
  64. }
  65. // generic return status
  66. message ReturnStatus {
  67. int32 code = 1;
  68. string message = 2;
  69. }
  70. message SessionInfo {
  71. string sessionId = 1;
  72. map<string, string> computingEngineConf = 2;
  73. string namingPolicy = 3;
  74. string tag = 4;
  75. }