File: rpc.fbs

package info (click to toggle)
python-autobahn 22.7.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,404 kB
  • sloc: python: 38,356; javascript: 2,705; makefile: 905; ansic: 371; sh: 63
file content (263 lines) | stat: -rw-r--r-- 8,392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263

//////////////////////////////////////////////////////////////////////////////
//
//   FlatBuffers schema for WAMP v2 messages
//   Copyright (c) Crossbar.io Technologies GmbH and contributors
//   Licensed under the MIT License (MIT)
//
//////////////////////////////////////////////////////////////////////////////

include "types.fbs";

namespace wamp.proto;


// CALL message (message_type = 48): [CALL, Request|id, Options|dict, Procedure|uri, Payload|binary]
table Call
{
    // The WAMP request ID of this request.
    request: uint64 (key);

    // The WAMP or application URI of the procedure which should be called.
    procedure: string (required, uri);

    // Raw application payload: call arguments. This might be encrypted (with Payload==Payload.CRYPTOBOX), and is serialized according to enc_serializer.
    payload: [uint8];

    // The encoding algorithm that was used to encode the payload.
    enc_algo: Payload;

    // The payload object serializer that was used encoding the payload.
    enc_serializer: Serializer;

    // When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
    enc_key: [uint8];

    // If present, cancel the call after this duration in ms.
    timeout: uint32;

    // When set, indicates that the caller wants to receive progressive call results.
    receive_progress: bool;

    // Application provided transaction hash for router-side throttle/deduplicate.
    transaction_hash: string;

    // Caller WAMP session ID (optional).
    caller: uint64;

    // Caller WAMP session authentication ID (optional).
    caller_authid: string (principal);

    // Caller WAMP session authentication role (optional).
    caller_authrole: string (principal);

    // R2R-link message forwarding route that was taken.
    forward_for: [Principal];
}


// CANCEL message (message_type = 49): [CANCEL, CALL.Request|id, Options|dict]
table Cancel
{
    // The request ID of the original CALL request.
    request: uint64 (key);

    // Specifies how to cancel the call.
    mode: CancelMode = SKIP;

    // R2R-link message forwarding route that was taken.
    forward_for: [Principal];
}


// RESULT message (message_type = 50): [RESULT, CALL.Request|id, Details|dict, Payload|binary]
table Result
{
    // The request ID of the original CALL request.
    request: uint64 (key);

    // Raw application payload: call result. This might be encrypted (with Payload==Payload.CRYPTOBOX), and is serialized according to enc_serializer.
    payload: [uint8];

    // The encoding algorithm that was used to encode the payload.
    enc_algo: Payload;

    // The payload object serializer that was used encoding the payload.
    enc_serializer: Serializer;

    // When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
    enc_key: [uint8];

    // If true, this result is a progressive call result, and subsequent results (or a final error) will follow.
    progress: bool;

    // Callee WAMP session ID (optional).
    callee: uint64;

    // Callee WAMP session authentication ID (optional).
    callee_authid: string (principal);

    // Callee WAMP session authentication role (optional).
    callee_authrole: string (principal);

    // R2R-link message forwarding route that was taken.
    forward_for: [Principal];
}


// REGISTER message (message_type = 64): [REGISTER, Request|id, Options|dict, Procedure|uri]
table Register
{
    // The WAMP request ID of this request.
    request: uint64 (key);

    // The WAMP or application URI of the RPC endpoint provided.
    procedure: string (required, uri_pattern);

    // The procedure matching policy to be used for the registration.
    match: Match = EXACT;

    // The procedure invocation policy to be used for the registration.
    invoke: InvocationPolicy;

    // The (maximum) concurrency to be used for the registration.
    concurrency: uint16;

    // Force registration of procedure (kicking any existing registration).
    force_reregister: bool;
}


// REGISTERED message (message_type = 65): [REGISTERED, REGISTER.Request|id, Registration|id]
table Registered
{
    // The request ID of the original ``REGISTER`` request.
    request: uint64 (key);

    // The registration ID for the registered procedure (or procedure pattern).
    registration: uint64;
}


// UNREGISTER message (message_type = 66): [UNREGISTER, Request|id, REGISTERED.Registration|id]
table Unregister
{
    // The request ID of the original ``REGISTER`` request.
    request: uint64 (key);

    // The registration ID for the registration to unregister.
    registration: uint64;
}


// UNREGISTERED message (message_type = 67): [UNREGISTERED, UNREGISTER.Request|id, Details|dict]
table Unregistered
{
    // The request ID of the original UNREGISTER request.
    request: uint64 (key);

    // If unregister was actively triggered by router, the ID of the registration revoked.
    registration: uint64;

    // The reason (an URI) for revocation.
    reason: string (uri);
}


// INVOCATION message (message_type = 68): [INVOCATION, Request|id, REGISTERED.Registration|id, Details|dict, Payload|binary]
table Invocation
{
    // The WAMP request ID of this request.
    request: uint64 (key);

    // The registration ID of the endpoint to be invoked.
    registration: uint64;

    // Raw application payload: call arguments. This might be encrypted (with Payload==Payload.CRYPTOBOX), and is serialized according to enc_serializer.
    payload: [uint8];

    // The encoding algorithm that was used to encode the payload.
    enc_algo: Payload;

    // The payload object serializer that was used encoding the payload.
    enc_serializer: Serializer;

    // When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
    enc_key: [uint8];

    // For pattern-based registrations (not for exact matching registrations, the invocation MUST include the actual procedure being called.
    procedure: string (uri);

    // If present, let the callee automatically cancels the invocation after this ms.
    timeout: uint32;

    // Indicates if the callee should produce progressive results.
    receive_progress: bool;

    // Application provided transaction hash for router-side throttle/deduplicate.
    transaction_hash: string;

    // The WAMP session ID of the caller. Only filled if caller is disclosed.
    caller: uint64;

    // The WAMP authid of the caller. Only filled if caller is disclosed.
    caller_authid: string (principal);

    // The WAMP authrole of the caller. Only filled if caller is disclosed.
    caller_authrole: string (principal);

    // R2R-link message forwarding route that was taken.
    forward_for: [Principal];
}


// INTERRUPT message (message_type = 69): [INTERRUPT, INVOCATION.Request|id, Options|dict]
table Interrupt
{
    // The WAMP request ID of this request.
    request: uint64 (key);

    // Specifies how to interrupt the invocation.
    mode: CancelMode = ABORT;

    // The reason (an URI) for the invocation interrupt.
    reason: string (uri);

    // R2R-link message forwarding route that was taken.
    forward_for: [Principal];
}


// YIELD message (message_type = 70): [YIELD, INVOCATION.Request|id, Options|dict, Payload|binary]
table Yield
{
    // The WAMP request ID of this request.
    request: uint64 (key);

    // Raw application payload: call result. This might be encrypted (with Payload==Payload.CRYPTOBOX), and is serialized according to enc_serializer.
    payload: [uint8];

    // The encoding algorithm that was used to encode the payload.
    enc_algo: Payload;

    // The payload object serializer that was used encoding the payload.
    enc_serializer: Serializer;

    // When using Payload.CRYPTOBOX, the public Cryptobox key of the key pair used for encrypting the payload.
    enc_key: [uint8];

    // If true, this result is a progressive invocation result, and subsequent results (or a final error) will follow.
    progress: bool;

    // Callee WAMP session ID (optional).
    callee: uint64;

    // Callee WAMP session authentication ID (optional).
    callee_authid: string (principal);

    // Callee WAMP session authentication role (optional).
    callee_authrole: string (principal);

    // R2R-link message forwarding route that was taken.
    forward_for: [Principal];
}