@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.
- package/Cargo.lock +90 -157
- package/Cargo.toml +1 -0
- package/index.d.ts +11 -27
- package/package.json +3 -3
- package/releases/aarch64-apple-darwin/index.node +0 -0
- package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
- package/releases/x86_64-apple-darwin/index.node +0 -0
- package/releases/x86_64-pc-windows-msvc/index.node +0 -0
- package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
- package/sdk-core/.buildkite/docker/Dockerfile +1 -1
- package/sdk-core/.buildkite/docker/docker-compose.yaml +1 -1
- package/sdk-core/.cargo/config.toml +1 -0
- package/sdk-core/CODEOWNERS +1 -1
- package/sdk-core/bridge-ffi/include/sdk-core-bridge.h +119 -86
- package/sdk-core/bridge-ffi/src/lib.rs +311 -315
- package/sdk-core/bridge-ffi/src/wrappers.rs +108 -113
- package/sdk-core/client/Cargo.toml +13 -9
- package/sdk-core/client/LICENSE.txt +23 -0
- package/sdk-core/client/src/lib.rs +286 -174
- package/sdk-core/client/src/metrics.rs +86 -12
- package/sdk-core/client/src/raw.rs +566 -0
- package/sdk-core/client/src/retry.rs +137 -99
- package/sdk-core/core/Cargo.toml +15 -10
- package/sdk-core/core/LICENSE.txt +23 -0
- package/sdk-core/core/benches/workflow_replay.rs +79 -0
- package/sdk-core/core/src/abstractions.rs +38 -0
- package/sdk-core/core/src/core_tests/activity_tasks.rs +108 -182
- package/sdk-core/core/src/core_tests/child_workflows.rs +16 -11
- package/sdk-core/core/src/core_tests/determinism.rs +24 -12
- package/sdk-core/core/src/core_tests/local_activities.rs +53 -27
- package/sdk-core/core/src/core_tests/mod.rs +30 -43
- package/sdk-core/core/src/core_tests/queries.rs +82 -81
- package/sdk-core/core/src/core_tests/workers.rs +111 -296
- package/sdk-core/core/src/core_tests/workflow_cancels.rs +4 -4
- package/sdk-core/core/src/core_tests/workflow_tasks.rs +213 -241
- package/sdk-core/core/src/lib.rs +73 -318
- package/sdk-core/core/src/pollers/mod.rs +4 -6
- package/sdk-core/core/src/pollers/poll_buffer.rs +20 -14
- package/sdk-core/core/src/protosext/mod.rs +7 -10
- package/sdk-core/core/src/replay/mod.rs +11 -150
- package/sdk-core/core/src/telemetry/metrics.rs +35 -2
- package/sdk-core/core/src/telemetry/mod.rs +49 -16
- package/sdk-core/core/src/telemetry/prometheus_server.rs +14 -35
- package/sdk-core/core/src/test_help/mod.rs +104 -170
- package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +57 -34
- package/sdk-core/core/src/worker/activities/local_activities.rs +37 -17
- package/sdk-core/core/src/worker/activities.rs +23 -16
- package/sdk-core/core/src/worker/client/mocks.rs +86 -0
- package/sdk-core/core/src/worker/client.rs +209 -0
- package/sdk-core/core/src/worker/mod.rs +193 -105
- package/sdk-core/core/src/workflow/driven_workflow.rs +21 -6
- package/sdk-core/core/src/workflow/history_update.rs +107 -24
- package/sdk-core/core/src/workflow/machines/activity_state_machine.rs +2 -3
- package/sdk-core/core/src/workflow/machines/child_workflow_state_machine.rs +2 -3
- package/sdk-core/core/src/workflow/machines/mod.rs +20 -17
- package/sdk-core/core/src/workflow/machines/signal_external_state_machine.rs +56 -19
- package/sdk-core/core/src/workflow/machines/transition_coverage.rs +5 -0
- package/sdk-core/core/src/workflow/machines/upsert_search_attributes_state_machine.rs +230 -22
- package/sdk-core/core/src/workflow/machines/workflow_machines.rs +81 -115
- package/sdk-core/core/src/workflow/machines/workflow_task_state_machine.rs +4 -4
- package/sdk-core/core/src/workflow/mod.rs +13 -1
- package/sdk-core/core/src/workflow/workflow_tasks/mod.rs +43 -33
- package/sdk-core/core-api/Cargo.toml +9 -1
- package/sdk-core/core-api/LICENSE.txt +23 -0
- package/sdk-core/core-api/src/errors.rs +7 -38
- package/sdk-core/core-api/src/lib.rs +44 -52
- package/sdk-core/core-api/src/worker.rs +10 -2
- package/sdk-core/etc/deps.svg +127 -96
- package/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +11 -7
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +10 -0
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +6 -1
- package/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +6 -0
- package/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +6 -0
- package/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +2 -1
- package/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +3 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +12 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +25 -0
- package/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +4 -0
- package/sdk-core/protos/local/temporal/sdk/core/bridge/bridge.proto +19 -35
- package/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +2 -6
- package/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +53 -11
- package/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +14 -7
- package/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +3 -5
- package/sdk-core/sdk/Cargo.toml +16 -2
- package/sdk-core/sdk/LICENSE.txt +23 -0
- package/sdk-core/sdk/src/interceptors.rs +11 -0
- package/sdk-core/sdk/src/lib.rs +138 -150
- package/sdk-core/sdk/src/workflow_context/options.rs +86 -1
- package/sdk-core/sdk/src/workflow_context.rs +36 -17
- package/sdk-core/sdk/src/workflow_future.rs +19 -25
- package/sdk-core/sdk-core-protos/Cargo.toml +1 -1
- package/sdk-core/sdk-core-protos/build.rs +1 -0
- package/sdk-core/sdk-core-protos/src/history_info.rs +17 -4
- package/sdk-core/sdk-core-protos/src/lib.rs +251 -47
- package/sdk-core/test-utils/Cargo.toml +3 -1
- package/sdk-core/test-utils/src/canned_histories.rs +27 -0
- package/sdk-core/test-utils/src/histfetch.rs +3 -3
- package/sdk-core/test-utils/src/lib.rs +223 -68
- package/sdk-core/tests/integ_tests/client_tests.rs +27 -4
- package/sdk-core/tests/integ_tests/heartbeat_tests.rs +93 -14
- package/sdk-core/tests/integ_tests/polling_tests.rs +18 -12
- package/sdk-core/tests/integ_tests/queries_tests.rs +50 -53
- package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +117 -103
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +8 -1
- package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +10 -5
- package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +7 -1
- package/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +8 -3
- package/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +7 -1
- package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +76 -15
- package/sdk-core/tests/integ_tests/workflow_tests/patches.rs +19 -3
- package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +39 -42
- package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +84 -0
- package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +30 -8
- package/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +21 -6
- package/sdk-core/tests/integ_tests/workflow_tests/timers.rs +26 -16
- package/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +66 -0
- package/sdk-core/tests/integ_tests/workflow_tests.rs +78 -74
- package/sdk-core/tests/load_tests.rs +9 -6
- package/sdk-core/tests/main.rs +43 -10
- package/src/conversions.rs +7 -12
- package/src/lib.rs +322 -357
- package/sdk-core/client/src/mocks.rs +0 -167
- package/sdk-core/core/src/worker/dispatcher.rs +0 -171
- 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
|
|
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
|
|
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
|
-
*
|
|
17
|
-
*
|
|
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
|
|
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
|
|
43
|
-
* present, the
|
|
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 (*
|
|
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
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* is a
|
|
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
|
|
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
|
|
92
|
+
* Create a new worker instance.
|
|
77
93
|
*
|
|
78
|
-
*
|
|
79
|
-
* req_proto_len represent a byte array for a
|
|
80
|
-
*
|
|
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
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
|
107
|
+
* Shutdown and free a previously created worker.
|
|
90
108
|
*
|
|
91
|
-
* The req_proto and req_proto_len represent a byte array for a
|
|
92
|
-
* protobuf message
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
*
|
|
105
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
118
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
137
|
+
* Initialize a client connection to the Temporal service.
|
|
129
138
|
*
|
|
130
|
-
* The
|
|
131
|
-
*
|
|
132
|
-
* completion
|
|
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
|
|
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
|
|
144
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
183
|
-
* RecordActivityHeartbeatRequest protobuf message. The callback is invoked
|
|
184
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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(
|
|
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);
|