github.com/cloudwan/edgelq-sdk@v1.15.4/proxies/proto/v1alpha2/broker_custom.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.proxies.v1alpha2;
     4  
     5  import "edgelq-sdk/proxies/proto/v1alpha2/project.proto";
     6  import "edgelq-sdk/proxies/proto/v1alpha2/project_change.proto";
     7  
     8  option go_package = "github.com/cloudwan/edgelq-sdk/proxies/client/v1alpha2/broker;broker_client";
     9  option java_multiple_files = false;
    10  option java_outer_classname = "BrokerCustomProto";
    11  option java_package = "com.ntt.proxies.pb.v1alpha2";
    12  
    13  // Request message for method [Connect][ntt.proxies.v1alpha2.Connect]
    14  message ConnectRequest {
    15    oneof message {
    16      // The initiation message to open a channel to a device.
    17      OpenRequest open_request = 1;
    18  
    19      // Attempt to resume stream of data
    20      ResumeRequest resume_request = 2;
    21  
    22      // ACK message
    23      Ack ack = 3;
    24  
    25      // Any data sent to the device through the endpoint.
    26      Data data = 4;
    27  
    28      Close close = 5;
    29  
    30      Error error = 6;
    31  
    32      Ping ping = 7;
    33    }
    34  
    35    message OpenRequest {
    36      string project = 1;
    37  
    38      string region_id = 6;
    39  
    40      string name = 2;
    41  
    42      // name to connect.
    43      string provider_name = 3;
    44  
    45      // Device service
    46      string service = 4;
    47  
    48      // Initial argument (optional)
    49      bytes arg = 5;
    50    }
    51  
    52    message ResumeRequest {
    53      string project = 1;
    54  
    55      string region_id = 7;
    56  
    57      string name = 2;
    58  
    59      // name to connect.
    60      string provider_name = 3;
    61  
    62      uint64 session_id = 4;
    63  
    64      uint64 channel_id = 5;
    65  
    66      uint64 last_message_id = 6;
    67    }
    68  }
    69  
    70  // Response message for method [Connect][ntt.proxies.v1alpha2.Connect]
    71  message ConnectResponse {
    72    oneof message {
    73      // Notification from the agent (endpoint) to the channel has been opened.
    74      OpenResponse open_response = 1;
    75  
    76      ResumeResponse resume_response = 2;
    77  
    78      ChannelOpenError channel_open_error = 3;
    79  
    80      // ACK message
    81      Ack ack = 4;
    82  
    83      // Any data from the device (endpoint) to the client.
    84      Data data = 5;
    85  
    86      Close close = 6;
    87  
    88      Error error = 7;
    89  
    90      Pong pong = 8;
    91    }
    92  
    93    message OpenResponse {
    94      uint64 session_id = 1;
    95  
    96      uint64 channel_id = 2;
    97    }
    98  
    99    message ResumeResponse {
   100      uint64 session_id = 1;
   101  
   102      uint64 channel_id = 2;
   103  
   104      uint64 last_message_id = 4;
   105    }
   106  
   107    message ChannelOpenError {
   108      // ID of the channel failed to open.
   109      uint64 channel_id = 1;
   110  
   111      // Error message.
   112      string message = 2;
   113    }
   114  }
   115  
   116  // Request message for method [Listen][ntt.proxies.v1alpha2.Listen]
   117  message ListenRequest {
   118    oneof message {
   119      // This is a hello message from the agent with its name.
   120      OpenRequest open_request = 1;
   121  
   122      ResumeRequest resume_request = 2;
   123  
   124      // When the agent failed to open a requested channel, this message will be
   125      // sent from the agent to the endpoint.
   126      ChannelOpenError channel_open_error = 3;
   127  
   128      Ping ping = 4;
   129    }
   130  
   131    message OpenRequest {
   132      string project = 1;
   133  
   134      string region_id = 3;
   135  
   136      // The self-declared device name, used for authentication/authorization.
   137      string name = 2;
   138    }
   139  
   140    message ResumeRequest {
   141      string project = 1;
   142  
   143      string region_id = 4;
   144  
   145      // The self-declared device name, used for authentication/authorization.
   146      string name = 2;
   147  
   148      uint64 session_id = 3;
   149    }
   150  
   151    message ChannelOpenError {
   152      // ID of the channel failed to open.
   153      uint64 channel_id = 1;
   154  
   155      // Error message.
   156      string message = 2;
   157    }
   158  }
   159  
   160  // Response message for method [Listen][ntt.proxies.v1alpha2.Listen]
   161  message ListenResponse {
   162    oneof message {
   163      Listening listening = 1;
   164  
   165      // Notifies a new channel has been requested by a client.
   166      OpenChannelResponse open_channel_response = 2;
   167  
   168      // Notifies a channel was asked to be resumed by a client
   169      ResumeChannelResponse resume_channel_response = 3;
   170  
   171      Pong pong = 4;
   172    }
   173  
   174    message Listening { uint64 session_id = 1; }
   175  
   176    message OpenChannelResponse {
   177      // Channel ID
   178      uint64 channel_id = 1;
   179  
   180      // Device service;
   181      string service = 2;
   182  
   183      // Initial argument (optional)
   184      bytes arg = 3;
   185    }
   186  
   187    message ResumeChannelResponse {
   188      // Channel ID
   189      uint64 channel_id = 1;
   190  
   191      // Device service;
   192      string service = 2;
   193  
   194      // Initial argument (optional)
   195      bytes arg = 3;
   196  
   197      uint64 last_message_id = 4;
   198    }
   199  }
   200  
   201  // Request message for method [Accept][ntt.proxies.v1alpha2.Accept]
   202  message AcceptRequest {
   203    oneof message {
   204      // Registers a new socket on the endpoint.
   205      OpenRequest open_request = 1;
   206  
   207      ResumeRequest resume_request = 2;
   208  
   209      // Data from the agent to the endpoint (client).
   210      Data data = 3;
   211  
   212      // ACK message
   213      Ack ack = 4;
   214  
   215      Close close = 5;
   216  
   217      Error error = 6;
   218  
   219      Ping ping = 7;
   220    }
   221  
   222    message OpenRequest {
   223      string project = 1;
   224  
   225      string region_id = 5;
   226  
   227      // Name, to be authenticated/authorized.
   228      string name = 2;
   229  
   230      uint64 session_id = 3;
   231  
   232      // Channel ID, requested by the endpoint in the ChannelRequested message.
   233      uint64 channel_id = 4;
   234    }
   235  
   236    message ResumeRequest {
   237      string project = 1;
   238  
   239      string region_id = 6;
   240  
   241      // Name, to be authenticated/authorized.
   242      string name = 2;
   243  
   244      uint64 session_id = 3;
   245  
   246      // Channel ID, requested by the endpoint in the ChannelRequested message.
   247      uint64 channel_id = 4;
   248  
   249      uint64 last_message_id = 5;
   250    }
   251  }
   252  
   253  // Response message for method [Accept][ntt.proxies.v1alpha2.Accept]
   254  message AcceptResponse {
   255    oneof message {
   256      // Data from the endpoint (client) to the agent.
   257      Data data = 1;
   258  
   259      // ACK message
   260      Ack ack = 2;
   261  
   262      Close close = 3;
   263  
   264      Error error = 4;
   265  
   266      Pong pong = 5;
   267    }
   268  }
   269  
   270  message Ping {}
   271  
   272  message Pong {}
   273  
   274  message Data {
   275    uint64 id = 1;
   276  
   277    bytes bytes = 2;
   278  
   279    bool ack_required = 3;
   280  }
   281  
   282  message Ack { uint64 id = 1; }
   283  
   284  message Close { uint64 id = 1; }
   285  
   286  message Error {
   287    uint64 id = 1;
   288  
   289    string message = 2;
   290  }