diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-27 19:11:56 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-01 13:17:30 +0700 |
| commit | 22ad970d426c07bb36c3f71856ba16183377a5f4 (patch) | |
| tree | 5ecddacad15fad7d3d5d38fe3ab9bbbde2e63395 /testdata/http_server/execute/local_test.data | |
| parent | 115adf2ed71b602204cd9fedb0e046e731aa7e38 (diff) | |
| download | awwan-22ad970d426c07bb36c3f71856ba16183377a5f4.tar.xz | |
all: handle reconnecting when streaming execution
In "/awwan/api/execute/tail" SSE endpoint, in order for client to be able
to reconnect and start streaming from the last know output, we need to
send the ID for each message that we send.
The ID is the index of Output in slice.
If client does not send Last-Event-ID, we send all Output from beginning,
otherwise, we send only message start from index in Last-Event-ID.
Diffstat (limited to 'testdata/http_server/execute/local_test.data')
| -rw-r--r-- | testdata/http_server/execute/local_test.data | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testdata/http_server/execute/local_test.data b/testdata/http_server/execute/local_test.data index a64b049..5cd6f5e 100644 --- a/testdata/http_server/execute/local_test.data +++ b/testdata/http_server/execute/local_test.data @@ -29,17 +29,22 @@ data: 2023-11-26T15:21:00Z event: message data: - local.aww === BEGIN: local /local.aww 1- +id: 0 event: message data: - local.aww --> 1: echo "test" +id: 1 event: message data: test +id: 2 event: message data: - local.aww === END +id: 3 event: end data: 2023-11-26T15:21:00Z +id: 3 |
