@temporalio/core-bridge 0.19.2 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/Cargo.lock +90 -157
  2. package/Cargo.toml +1 -0
  3. package/index.d.ts +11 -27
  4. package/package.json +3 -3
  5. package/releases/aarch64-apple-darwin/index.node +0 -0
  6. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  7. package/releases/x86_64-apple-darwin/index.node +0 -0
  8. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  9. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  10. package/sdk-core/.buildkite/docker/Dockerfile +1 -1
  11. package/sdk-core/.buildkite/docker/docker-compose.yaml +1 -1
  12. package/sdk-core/.cargo/config.toml +1 -0
  13. package/sdk-core/CODEOWNERS +1 -1
  14. package/sdk-core/bridge-ffi/include/sdk-core-bridge.h +119 -86
  15. package/sdk-core/bridge-ffi/src/lib.rs +311 -315
  16. package/sdk-core/bridge-ffi/src/wrappers.rs +108 -113
  17. package/sdk-core/client/Cargo.toml +13 -9
  18. package/sdk-core/client/LICENSE.txt +23 -0
  19. package/sdk-core/client/src/lib.rs +286 -174
  20. package/sdk-core/client/src/metrics.rs +86 -12
  21. package/sdk-core/client/src/raw.rs +566 -0
  22. package/sdk-core/client/src/retry.rs +137 -99
  23. package/sdk-core/core/Cargo.toml +15 -10
  24. package/sdk-core/core/LICENSE.txt +23 -0
  25. package/sdk-core/core/benches/workflow_replay.rs +79 -0
  26. package/sdk-core/core/src/abstractions.rs +38 -0
  27. package/sdk-core/core/src/core_tests/activity_tasks.rs +108 -182
  28. package/sdk-core/core/src/core_tests/child_workflows.rs +16 -11
  29. package/sdk-core/core/src/core_tests/determinism.rs +24 -12
  30. package/sdk-core/core/src/core_tests/local_activities.rs +53 -27
  31. package/sdk-core/core/src/core_tests/mod.rs +30 -43
  32. package/sdk-core/core/src/core_tests/queries.rs +82 -81
  33. package/sdk-core/core/src/core_tests/workers.rs +111 -296
  34. package/sdk-core/core/src/core_tests/workflow_cancels.rs +4 -4
  35. package/sdk-core/core/src/core_tests/workflow_tasks.rs +213 -241
  36. package/sdk-core/core/src/lib.rs +73 -318
  37. package/sdk-core/core/src/pollers/mod.rs +4 -6
  38. package/sdk-core/core/src/pollers/poll_buffer.rs +20 -14
  39. package/sdk-core/core/src/protosext/mod.rs +7 -10
  40. package/sdk-core/core/src/replay/mod.rs +11 -150
  41. package/sdk-core/core/src/telemetry/metrics.rs +35 -2
  42. package/sdk-core/core/src/telemetry/mod.rs +49 -16
  43. package/sdk-core/core/src/telemetry/prometheus_server.rs +14 -35
  44. package/sdk-core/core/src/test_help/mod.rs +104 -170
  45. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +57 -34
  46. package/sdk-core/core/src/worker/activities/local_activities.rs +37 -17
  47. package/sdk-core/core/src/worker/activities.rs +23 -16
  48. package/sdk-core/core/src/worker/client/mocks.rs +86 -0
  49. package/sdk-core/core/src/worker/client.rs +209 -0
  50. package/sdk-core/core/src/worker/mod.rs +193 -105
  51. package/sdk-core/core/src/workflow/driven_workflow.rs +21 -6
  52. package/sdk-core/core/src/workflow/history_update.rs +107 -24
  53. package/sdk-core/core/src/workflow/machines/activity_state_machine.rs +2 -3
  54. package/sdk-core/core/src/workflow/machines/child_workflow_state_machine.rs +2 -3
  55. package/sdk-core/core/src/workflow/machines/mod.rs +20 -17
  56. package/sdk-core/core/src/workflow/machines/signal_external_state_machine.rs +56 -19
  57. package/sdk-core/core/src/workflow/machines/transition_coverage.rs +5 -0
  58. package/sdk-core/core/src/workflow/machines/upsert_search_attributes_state_machine.rs +230 -22
  59. package/sdk-core/core/src/workflow/machines/workflow_machines.rs +81 -115
  60. package/sdk-core/core/src/workflow/machines/workflow_task_state_machine.rs +4 -4
  61. package/sdk-core/core/src/workflow/mod.rs +13 -1
  62. package/sdk-core/core/src/workflow/workflow_tasks/mod.rs +43 -33
  63. package/sdk-core/core-api/Cargo.toml +9 -1
  64. package/sdk-core/core-api/LICENSE.txt +23 -0
  65. package/sdk-core/core-api/src/errors.rs +7 -38
  66. package/sdk-core/core-api/src/lib.rs +44 -52
  67. package/sdk-core/core-api/src/worker.rs +10 -2
  68. package/sdk-core/etc/deps.svg +127 -96
  69. package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +11 -7
  70. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +10 -0
  71. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +6 -1
  72. package/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +6 -0
  73. package/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +6 -0
  74. package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +2 -1
  75. package/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +3 -0
  76. package/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +12 -0
  77. package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +25 -0
  78. package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +4 -0
  79. package/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +19 -35
  80. package/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +2 -6
  81. package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +53 -11
  82. package/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +14 -7
  83. package/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +3 -5
  84. package/sdk-core/sdk/Cargo.toml +16 -2
  85. package/sdk-core/sdk/LICENSE.txt +23 -0
  86. package/sdk-core/sdk/src/interceptors.rs +11 -0
  87. package/sdk-core/sdk/src/lib.rs +138 -150
  88. package/sdk-core/sdk/src/workflow_context/options.rs +86 -1
  89. package/sdk-core/sdk/src/workflow_context.rs +36 -17
  90. package/sdk-core/sdk/src/workflow_future.rs +19 -25
  91. package/sdk-core/sdk-core-protos/Cargo.toml +1 -1
  92. package/sdk-core/sdk-core-protos/build.rs +1 -0
  93. package/sdk-core/sdk-core-protos/src/history_info.rs +17 -4
  94. package/sdk-core/sdk-core-protos/src/lib.rs +251 -47
  95. package/sdk-core/test-utils/Cargo.toml +3 -1
  96. package/sdk-core/test-utils/src/canned_histories.rs +27 -0
  97. package/sdk-core/test-utils/src/histfetch.rs +3 -3
  98. package/sdk-core/test-utils/src/lib.rs +223 -68
  99. package/sdk-core/tests/integ_tests/client_tests.rs +27 -4
  100. package/sdk-core/tests/integ_tests/heartbeat_tests.rs +93 -14
  101. package/sdk-core/tests/integ_tests/polling_tests.rs +18 -12
  102. package/sdk-core/tests/integ_tests/queries_tests.rs +50 -53
  103. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +117 -103
  104. package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +8 -1
  105. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +10 -5
  106. package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +7 -1
  107. package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +8 -3
  108. package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +7 -1
  109. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +76 -15
  110. package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +19 -3
  111. package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +39 -42
  112. package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +84 -0
  113. package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +30 -8
  114. package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +21 -6
  115. package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +26 -16
  116. package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +66 -0
  117. package/sdk-core/tests/integ_tests/workflow_tests.rs +78 -74
  118. package/sdk-core/tests/load_tests.rs +9 -6
  119. package/sdk-core/tests/main.rs +43 -10
  120. package/src/conversions.rs +7 -12
  121. package/src/lib.rs +322 -357
  122. package/sdk-core/client/src/mocks.rs +0 -167
  123. package/sdk-core/core/src/worker/dispatcher.rs +0 -171
  124. package/sdk-core/protos/local/temporal/sdk/core/bridge/service.proto +0 -61
@@ -6,18 +6,25 @@
6
6
  #include <stdlib.h>
7
7
 
8
8
  /**
9
- * A core instance owned by Core. This must be passed to tmprl_core_shutdown
9
+ * A client instance owned by Core. This must be passed to [tmprl_client_free]
10
10
  * when no longer in use which will free the resources.
11
11
  */
12
- typedef struct tmprl_core_t tmprl_core_t;
12
+ typedef struct tmprl_client_t tmprl_client_t;
13
13
 
14
14
  /**
15
- * A runtime owned by Core. This must be passed to tmprl_runtime_free when no
16
- * longer in use. This must not be freed until every call to every tmprl_core_t
17
- * instance created with this runtime has been shutdown.
15
+ * A runtime owned by Core. This must be passed to [tmprl_runtime_free] when no longer in use. This
16
+ * should not be freed until every call to every [tmprl_worker_t] instance created with this
17
+ * runtime has been shutdown. In practice, since the actual runtime is behind an [Arc], it's
18
+ * currently OK, but that's an implementation detail.
18
19
  */
19
20
  typedef struct tmprl_runtime_t tmprl_runtime_t;
20
21
 
22
+ /**
23
+ * A worker instance owned by Core. This must be passed to [tmprl_worker_shutdown]
24
+ * when no longer in use which will free the resources.
25
+ */
26
+ typedef struct tmprl_worker_t tmprl_worker_t;
27
+
21
28
  /**
22
29
  * A set of bytes owned by Core. No fields within nor any bytes references must
23
30
  * ever be mutated outside of Core. This must always be passed to
@@ -37,29 +44,38 @@ typedef struct tmprl_bytes_t {
37
44
  } tmprl_bytes_t;
38
45
 
39
46
  /**
40
- * Callback called by tmprl_core_init on completion. The first parameter of the
47
+ * Callback called by [tmprl_worker_init] on completion. The first parameter of the
41
48
  * callback is user data passed into the original function. The second
42
- * parameter is a core instance if the call is successful or null if not. If
43
- * present, the core instance must be freed via tmprl_core_shutdown when no
49
+ * parameter is a worker instance if the call is successful or null if not. If
50
+ * present, the worker instance must be freed via [tmprl_worker_shutdown] when no
44
51
  * longer in use. The third parameter of the callback is a byte array for a
45
- * InitResponse protobuf message which must be freed via tmprl_bytes_free.
52
+ * [InitResponse] protobuf message which must be freed via [tmprl_bytes_free].
46
53
  */
47
- typedef void (*tmprl_core_init_callback)(void *user_data, struct tmprl_core_t *core, const struct tmprl_bytes_t *resp);
54
+ typedef void (*tmprl_worker_init_callback)(void *user_data, struct tmprl_worker_t *worker, const struct tmprl_bytes_t *resp);
48
55
 
49
56
  /**
50
57
  * Callback called on function completion. The first parameter of the callback
51
58
  * is user data passed into the original function. The second parameter of the
52
59
  * callback is a never-null byte array for a response protobuf message which
53
- * must be freed via tmprl_bytes_free.
60
+ * must be freed via [tmprl_bytes_free].
54
61
  */
55
62
  typedef void (*tmprl_callback)(void *user_data, const struct tmprl_bytes_t *core);
56
63
 
57
64
  /**
58
- * Free a set of bytes. The first parameter can be null in cases where a
59
- * tmprl_core_t instance isn't available. If the second parameter is null, this
60
- * is a no-op.
65
+ * Callback called by [tmprl_client_init] on completion. The first parameter of the
66
+ * callback is user data passed into the original function. The second
67
+ * parameter is a client instance if the call is successful or null if not. If
68
+ * present, the client instance must be freed via [tmprl_client_free] when no
69
+ * longer in use. The third parameter of the callback is a byte array for a
70
+ * [InitResponse] protobuf message which must be freed via [tmprl_bytes_free].
71
+ */
72
+ typedef void (*tmprl_client_init_callback)(void *user_data, struct tmprl_client_t *client, const struct tmprl_bytes_t *resp);
73
+
74
+ /**
75
+ * Free a set of bytes. The first parameter can be null in cases where a [tmprl_worker_t] instance
76
+ * isn't available. If the second parameter is null, this is a no-op.
61
77
  */
62
- void tmprl_bytes_free(struct tmprl_core_t *core, const struct tmprl_bytes_t *bytes);
78
+ void tmprl_bytes_free(struct tmprl_worker_t *worker, const struct tmprl_bytes_t *bytes);
63
79
 
64
80
  /**
65
81
  * Create a new runtime. The result is never null and must be freed via
@@ -73,144 +89,161 @@ struct tmprl_runtime_t *tmprl_runtime_new(void);
73
89
  void tmprl_runtime_free(struct tmprl_runtime_t *runtime);
74
90
 
75
91
  /**
76
- * Create a new core instance.
92
+ * Create a new worker instance.
77
93
  *
78
- * The runtime is required and must outlive this instance. The req_proto and
79
- * req_proto_len represent a byte array for a InitRequest protobuf message. The
80
- * callback is invoked on completion.
94
+ * `runtime` and `client` are both required and must outlive this instance.
95
+ * `req_proto` and `req_proto_len` represent a byte array for a [CreateWorkerRequest] protobuf
96
+ * message.
97
+ * The callback is invoked on completion.
81
98
  */
82
- void tmprl_core_init(struct tmprl_runtime_t *runtime,
83
- const uint8_t *req_proto,
84
- size_t req_proto_len,
85
- void *user_data,
86
- tmprl_core_init_callback callback);
99
+ void tmprl_worker_init(struct tmprl_runtime_t *runtime,
100
+ struct tmprl_client_t *client,
101
+ const uint8_t *req_proto,
102
+ size_t req_proto_len,
103
+ void *user_data,
104
+ tmprl_worker_init_callback callback);
87
105
 
88
106
  /**
89
- * Shutdown and free a core instance.
107
+ * Shutdown and free a previously created worker.
90
108
  *
91
- * The req_proto and req_proto_len represent a byte array for a ShutdownRequest
92
- * protobuf message. The callback is invoked on completion with a
93
- * ShutdownResponse protobuf message.
94
- */
95
- void tmprl_core_shutdown(struct tmprl_core_t *core,
96
- const uint8_t *req_proto,
97
- size_t req_proto_len,
98
- void *user_data,
99
- tmprl_callback callback);
100
-
101
- /**
102
- * Register a worker.
109
+ * The req_proto and req_proto_len represent a byte array for a [bridge::ShutdownWorkerRequest]
110
+ * protobuf message, which currently contains nothing and are unused, but the parameters are kept
111
+ * for now.
112
+ *
113
+ * The callback is invoked on completion with a ShutdownWorkerResponse protobuf message.
103
114
  *
104
- * The req_proto and req_proto_len represent a byte array for a RegisterWorker
105
- * protobuf message. The callback is invoked on completion with a
106
- * RegisterWorkerResponse protobuf message.
115
+ * After the callback has been called, the worker struct will be freed and the pointer will no
116
+ * longer be valid.
107
117
  */
108
- void tmprl_register_worker(struct tmprl_core_t *core,
118
+ void tmprl_worker_shutdown(struct tmprl_worker_t *worker,
109
119
  const uint8_t *req_proto,
110
120
  size_t req_proto_len,
111
121
  void *user_data,
112
122
  tmprl_callback callback);
113
123
 
114
124
  /**
115
- * Shutdown registered worker.
125
+ * Initialize process-wide telemetry. Should only be called once, subsequent calls will be ignored
126
+ * by core.
127
+ *
128
+ * Unlike the other functions in this bridge, this blocks until initting is complete, as telemetry
129
+ * should typically be initialized before doing other work.
116
130
  *
117
- * The req_proto and req_proto_len represent a byte array for a
118
- * ShutdownWorkerRequest protobuf message. The callback is invoked on
119
- * completion with a ShutdownWorkerResponse protobuf message.
131
+ * Returns a byte array for a [InitResponse] protobuf message which must be freed via
132
+ * tmprl_bytes_free.
120
133
  */
121
- void tmprl_shutdown_worker(struct tmprl_core_t *core,
122
- const uint8_t *req_proto,
123
- size_t req_proto_len,
124
- void *user_data,
125
- tmprl_callback callback);
134
+ const struct tmprl_bytes_t *tmprl_telemetry_init(const uint8_t *req_proto, size_t req_proto_len);
126
135
 
127
136
  /**
128
- * Poll workflow activation.
137
+ * Initialize a client connection to the Temporal service.
129
138
  *
130
- * The req_proto and req_proto_len represent a byte array for a
131
- * PollWorkflowActivationRequest protobuf message. The callback is invoked on
132
- * completion with a PollWorkflowActivationResponse protobuf message.
139
+ * The runtime is required and must outlive this instance. The `req_proto` and `req_proto_len`
140
+ * represent a byte array for a [CreateClientRequest] protobuf message. The callback is invoked on
141
+ * completion.
142
+ */
143
+ void tmprl_client_init(struct tmprl_runtime_t *runtime,
144
+ const uint8_t *req_proto,
145
+ size_t req_proto_len,
146
+ void *user_data,
147
+ tmprl_client_init_callback callback);
148
+
149
+ /**
150
+ * Free a previously created client
133
151
  */
134
- void tmprl_poll_workflow_activation(struct tmprl_core_t *core,
152
+ void tmprl_client_free(struct tmprl_client_t *client);
153
+
154
+ /**
155
+ * Poll for a workflow activation.
156
+ *
157
+ * The `req_proto` and `req_proto_len` represent a byte array for a
158
+ * [bridge::PollWorkflowActivationRequest] protobuf message, which currently contains nothing and
159
+ * is unused, but the parameters are kept for now.
160
+ *
161
+ * The callback is invoked on completion with a [bridge::PollWorkflowActivationResponse] protobuf
162
+ * message.
163
+ */
164
+ void tmprl_poll_workflow_activation(struct tmprl_worker_t *worker,
135
165
  const uint8_t *req_proto,
136
166
  size_t req_proto_len,
137
167
  void *user_data,
138
168
  tmprl_callback callback);
139
169
 
140
170
  /**
141
- * Poll activity task.
171
+ * Poll for an activity task.
172
+ *
173
+ * The `req_proto` and `req_proto_len` represent a byte array for a
174
+ * [bridge::PollActivityTaskRequest] protobuf message, which currently contains nothing and is
175
+ * unused, but the parameters are kept for now.
142
176
  *
143
- * The req_proto and req_proto_len represent a byte array for a
144
- * PollActivityTaskRequest protobuf message. The callback is invoked on
145
- * completion with a PollActivityTaskResponse protobuf message.
177
+ * The callback is invoked on completion with a [bridge::PollActivityTaskResponse] protobuf
178
+ * message.
146
179
  */
147
- void tmprl_poll_activity_task(struct tmprl_core_t *core,
180
+ void tmprl_poll_activity_task(struct tmprl_worker_t *worker,
148
181
  const uint8_t *req_proto,
149
182
  size_t req_proto_len,
150
183
  void *user_data,
151
184
  tmprl_callback callback);
152
185
 
153
186
  /**
154
- * Complete workflow activation.
187
+ * Complete a workflow activation.
155
188
  *
156
- * The req_proto and req_proto_len represent a byte array for a
157
- * CompleteWorkflowActivationRequest protobuf message. The callback is invoked
158
- * on completion with a CompleteWorkflowActivationResponse protobuf message.
189
+ * The `req_proto` and `req_proto_len` represent a byte array for a
190
+ * [bridge::CompleteWorkflowActivationRequest] protobuf message. The callback is invoked on
191
+ * completion with a [bridge::CompleteWorkflowActivationResponse] protobuf message.
159
192
  */
160
- void tmprl_complete_workflow_activation(struct tmprl_core_t *core,
193
+ void tmprl_complete_workflow_activation(struct tmprl_worker_t *worker,
161
194
  const uint8_t *req_proto,
162
195
  size_t req_proto_len,
163
196
  void *user_data,
164
197
  tmprl_callback callback);
165
198
 
166
199
  /**
167
- * Complete activity task.
200
+ * Complete an activity task.
168
201
  *
169
- * The req_proto and req_proto_len represent a byte array for a
170
- * CompleteActivityTaskRequest protobuf message. The callback is invoked
171
- * on completion with a CompleteActivityTaskResponse protobuf message.
202
+ * The `req_proto` and `req_proto_len` represent a byte array for a
203
+ * [bridge::CompleteActivityTaskRequest] protobuf message. The callback is invoked on completion
204
+ * with a [bridge::CompleteActivityTaskResponse] protobuf message.
172
205
  */
173
- void tmprl_complete_activity_task(struct tmprl_core_t *core,
206
+ void tmprl_complete_activity_task(struct tmprl_worker_t *worker,
174
207
  const uint8_t *req_proto,
175
208
  size_t req_proto_len,
176
209
  void *user_data,
177
210
  tmprl_callback callback);
178
211
 
179
212
  /**
180
- * Record activity heartbeat.
213
+ * Record an activity heartbeat.
181
214
  *
182
- * The req_proto and req_proto_len represent a byte array for a
183
- * RecordActivityHeartbeatRequest protobuf message. The callback is invoked
184
- * on completion with a RecordActivityHeartbeatResponse protobuf message.
215
+ * `req_proto` and `req_proto_len` represent a byte array for a
216
+ * [bridge::RecordActivityHeartbeatRequest] protobuf message. The callback is invoked on completion
217
+ * with a RecordActivityHeartbeatResponse protobuf message.
185
218
  */
186
- void tmprl_record_activity_heartbeat(struct tmprl_core_t *core,
219
+ void tmprl_record_activity_heartbeat(struct tmprl_worker_t *worker,
187
220
  const uint8_t *req_proto,
188
221
  size_t req_proto_len,
189
222
  void *user_data,
190
223
  tmprl_callback callback);
191
224
 
192
225
  /**
193
- * Request workflow eviction.
226
+ * Request a workflow eviction.
194
227
  *
195
- * The req_proto and req_proto_len represent a byte array for a
196
- * RequestWorkflowEvictionRequest protobuf message. The callback is invoked
197
- * on completion with a RequestWorkflowEvictionResponse protobuf message.
228
+ * The `req_proto` and `req_proto_len` represent a byte array for a
229
+ * [bridge::RequestWorkflowEvictionRequest] protobuf message. The callback is invoked on completion
230
+ * with a [bridge::RequestWorkflowEvictionResponse] protobuf message.
198
231
  */
199
- void tmprl_request_workflow_eviction(struct tmprl_core_t *core,
232
+ void tmprl_request_workflow_eviction(struct tmprl_worker_t *worker,
200
233
  const uint8_t *req_proto,
201
234
  size_t req_proto_len,
202
235
  void *user_data,
203
236
  tmprl_callback callback);
204
237
 
205
238
  /**
206
- * Fetch buffered logs.
239
+ * Fetch buffered logs. Blocks until complete. This is still using the callback since we might
240
+ * reasonably change log fetching to be async in the future.
207
241
  *
208
- * The req_proto and req_proto_len represent a byte array for a
209
- * FetchBufferedLogsRequest protobuf message. The callback is invoked
210
- * on completion with a FetchBufferedLogsResponse protobuf message.
242
+ * The `req_proto` and `req_proto_len` represent a byte array for a
243
+ * [bridge::FetchBufferedLogsRequest] protobuf message. The callback is invoked on completion with
244
+ * a [bridge::FetchBufferedLogsResponse] protobuf message.
211
245
  */
212
- void tmprl_fetch_buffered_logs(struct tmprl_core_t *core,
213
- const uint8_t *req_proto,
246
+ void tmprl_fetch_buffered_logs(const uint8_t *req_proto,
214
247
  size_t req_proto_len,
215
248
  void *user_data,
216
249
  tmprl_callback callback);