-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathClientMessageDtos.proto
389 lines (328 loc) · 7.5 KB
/
ClientMessageDtos.proto
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
syntax = "proto3";
package Prooph.EventStoreClient.Messages.ClientMessages;
enum OperationResult
{
Success = 0;
PrepareTimeout = 1;
CommitTimeout = 2;
ForwardTimeout = 3;
WrongExpectedVersion = 4;
StreamDeleted = 5;
InvalidTransaction = 6;
AccessDenied = 7;
}
message NewEvent {
bytes event_id = 1;
string event_type = 2;
int32 data_content_type = 3;
int32 metadata_content_type = 4;
bytes data = 5;
bytes metadata = 6;
}
message EventRecord {
string event_stream_id = 1;
int64 event_number = 2;
bytes event_id = 3;
string event_type = 4;
int32 data_content_type = 5;
int32 metadata_content_type = 6;
bytes data = 7;
bytes metadata = 8;
int64 created = 9;
int64 created_epoch = 10;
}
message ResolvedIndexedEvent {
EventRecord event = 1;
EventRecord link = 2;
}
message ResolvedEvent {
EventRecord event = 1;
EventRecord link = 2;
int64 commit_position = 3;
int64 prepare_position = 4;
}
message WriteEvents {
string event_stream_id = 1;
int64 expected_version = 2;
repeated NewEvent events = 3;
bool require_master = 4;
}
message WriteEventsCompleted {
OperationResult result = 1;
string message = 2;
int64 first_event_number = 3;
int64 last_event_number = 4;
int64 prepare_position = 5;
int64 commit_position = 6;
int64 current_version = 7;
}
message DeleteStream {
string event_stream_id = 1;
int64 expected_version = 2;
bool require_master = 3;
bool hard_delete = 4;
}
message DeleteStreamCompleted {
OperationResult result = 1;
string message = 2;
int64 prepare_position = 3;
int64 commit_position = 4;
}
message TransactionStart {
string event_stream_id = 1;
int64 expected_version = 2;
bool require_master = 3;
}
message TransactionStartCompleted {
int64 transaction_id = 1;
OperationResult result = 2;
string message = 3;
}
message TransactionWrite {
int64 transaction_id = 1;
repeated NewEvent events = 2;
bool require_master = 3;
}
message TransactionWriteCompleted {
int64 transaction_id = 1;
OperationResult result = 2;
string message = 3;
}
message TransactionCommit {
int64 transaction_id = 1;
bool require_master = 2;
}
message TransactionCommitCompleted {
int64 transaction_id = 1;
OperationResult result = 2;
string message = 3;
int64 first_event_number = 4;
int64 last_event_number = 5;
int64 prepare_position = 6;
int64 commit_position = 7;
}
message ReadEvent {
string event_stream_id = 1;
int64 event_number = 2;
bool resolve_link_tos = 3;
bool require_master = 4;
}
message ReadEventCompleted {
enum ReadEventResult {
Success = 0;
NotFound = 1;
NoStream = 2;
StreamDeleted = 3;
Error = 4;
AccessDenied = 5;
}
ReadEventResult result = 1;
ResolvedIndexedEvent event = 2;
string error = 3;
}
message ReadStreamEvents {
string event_stream_id = 1;
int64 from_event_number = 2;
int32 max_count = 3;
bool resolve_link_tos = 4;
bool require_master = 5;
}
message ReadStreamEventsCompleted {
enum ReadStreamResult {
Success = 0;
NoStream = 1;
StreamDeleted = 2;
NotModified = 3;
Error = 4;
AccessDenied = 5;
}
repeated ResolvedIndexedEvent events = 1;
ReadStreamResult result = 2;
int64 next_event_number = 3;
int64 last_event_number = 4;
bool is_end_of_stream = 5;
int64 last_commit_position = 6;
string error = 7;
}
message ReadAllEvents {
int64 commit_position = 1;
int64 prepare_position = 2;
int32 max_count = 3;
bool resolve_link_tos = 4;
bool require_master = 5;
}
message ReadAllEventsCompleted {
enum ReadAllResult {
Success = 0;
NotModified = 1;
Error = 2;
AccessDenied = 3;
}
int64 commit_position = 1;
int64 prepare_position = 2;
repeated ResolvedEvent events = 3;
int64 next_commit_position = 4;
int64 next_prepare_position = 5;
ReadAllResult result = 6;
string error = 7;
}
message CreatePersistentSubscription {
string subscription_group_name = 1;
string event_stream_id = 2;
bool resolve_link_tos = 3;
int64 start_from = 4;
int32 message_timeout_milliseconds = 5;
bool record_statistics = 6;
int32 live_buffer_size = 7;
int32 read_batch_size = 8;
int32 buffer_size = 9;
int32 max_retry_count = 10;
bool prefer_round_robin = 11;
int32 checkpoint_after_time = 12;
int32 checkpoint_max_count = 13;
int32 checkpoint_min_count = 14;
int32 subscriber_max_count = 15;
string named_consumer_strategy = 16;
}
message DeletePersistentSubscription {
string subscription_group_name = 1;
string event_stream_id = 2;
}
message UpdatePersistentSubscription {
string subscription_group_name = 1;
string event_stream_id = 2;
bool resolve_link_tos = 3;
int64 start_from = 4;
int32 message_timeout_milliseconds = 5;
bool record_statistics = 6;
int32 live_buffer_size = 7;
int32 read_batch_size = 8;
int32 buffer_size = 9;
int32 max_retry_count = 10;
bool prefer_round_robin = 11;
int32 checkpoint_after_time = 12;
int32 checkpoint_max_count = 13;
int32 checkpoint_min_count = 14;
int32 subscriber_max_count = 15;
string named_consumer_strategy = 16;
}
message UpdatePersistentSubscriptionCompleted {
enum UpdatePersistentSubscriptionResult {
Success = 0;
DoesNotExist = 1;
Fail = 2;
AccessDenied=3;
}
UpdatePersistentSubscriptionResult result = 1;
string reason = 2;
}
message CreatePersistentSubscriptionCompleted {
enum CreatePersistentSubscriptionResult {
Success = 0;
AlreadyExists = 1;
Fail = 2;
AccessDenied=3;
}
CreatePersistentSubscriptionResult result = 1;
string reason = 2;
}
message DeletePersistentSubscriptionCompleted {
enum DeletePersistentSubscriptionResult {
Success = 0;
DoesNotExist = 1;
Fail = 2;
AccessDenied = 3;
}
DeletePersistentSubscriptionResult result = 1;
string reason = 2;
}
message ConnectToPersistentSubscription {
string subscription_id = 1;
string event_stream_id = 2;
int32 allowed_in_flight_messages = 3;
}
message PersistentSubscriptionAckEvents {
string subscription_id = 1;
repeated bytes processed_event_ids = 2;
}
message PersistentSubscriptionNakEvents {
enum NakAction {
Unknown = 0;
Park = 1;
Retry = 2;
Skip = 3;
Stop = 4;
}
string subscription_id = 1;
repeated bytes processed_event_ids = 2;
string message = 3;
NakAction action = 4;
}
message PersistentSubscriptionConfirmation {
int64 last_commit_position = 1;
string subscription_id = 2;
int64 last_event_number = 3;
}
message PersistentSubscriptionStreamEventAppeared {
ResolvedIndexedEvent event = 1;
int32 retryCount = 2;
}
message SubscribeToStream {
string event_stream_id = 1;
bool resolve_link_tos = 2;
}
message SubscriptionConfirmation {
int64 last_commit_position = 1;
int64 last_event_number = 2;
}
message StreamEventAppeared {
ResolvedEvent event = 1;
}
message UnsubscribeFromStream {
}
message SubscriptionDropped {
enum SubscriptionDropReason {
Unsubscribed = 0;
AccessDenied = 1;
NotFound=2;
PersistentSubscriptionDeleted=3;
SubscriberMaxCountReached=4;
}
SubscriptionDropReason reason = 1;
}
message NotHandled {
enum NotHandledReason {
NotReady = 0;
TooBusy = 1;
NotMaster = 2;
}
NotHandledReason reason = 1;
bytes additional_info = 2;
message MasterInfo {
string external_tcp_address = 1;
int32 external_tcp_port = 2;
string external_http_address = 3;
int32 external_http_port = 4;
string external_secure_tcp_address = 5;
int32 external_secure_tcp_port = 6;
}
}
message ScavengeDatabase {
}
message ScavengeDatabaseCompleted {
enum ScavengeResult {
Success = 0;
InProgress = 1;
Failed = 2;
}
ScavengeResult result = 1;
string error = 2;
int32 total_time_ms = 3;
int64 total_space_saved = 4;
}
message IdentifyClient {
int32 version = 1;
string connection_name = 2;
}
message ClientIdentified {
}