<feed xmlns='http://www.w3.org/2005/Atom'>
<title>awwan/exec_response.go, branch dev</title>
<subtitle>Configuration management software, scriptable shell with SSH support.</subtitle>
<id>http://git.kilabit.info/awwan/atom?h=dev</id>
<link rel='self' href='http://git.kilabit.info/awwan/atom?h=dev'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/'/>
<updated>2026-02-06T00:08:29Z</updated>
<entry>
<title>all: improve the Server-Sent Events (SSE) output</title>
<updated>2026-02-06T00:08:29Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-02-06T00:08:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=54d395f53e344a3cf3861c0e3d2f82ad14ecc602'/>
<id>urn:sha1:54d395f53e344a3cf3861c0e3d2f82ad14ecc602</id>
<content type='text'>
In the ExecResponse, store the event in the Output instead of message
data, so the server can iterate the Output directly and pass it to
WriteEvent directly.

The event ID now start at 1 with type "begin".
This is to minimize confusion when comparing empty Last-Event-ID from
client, which is equal to 0.
</content>
</entry>
<entry>
<title>all: fix data race in tests and [httpServer.ExecuteTail]</title>
<updated>2026-02-03T13:32:57Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2026-02-03T13:32:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=a4bf3113e62ecfb74ab2c89f1cdfc7375af1c59e'/>
<id>urn:sha1:a4bf3113e62ecfb74ab2c89f1cdfc7375af1c59e</id>
<content type='text'>
In the test for AwwanLocal, use buffer with lock, so each write and
read is safe.

In the httpServer, the test found data race during ExecuteTail when
accessing [ExecResponse.EndAt].
We fix it by locking the resource during call to end() and when
accessing the EndAt field.
</content>
</entry>
<entry>
<title>all: replace module "share" with "pakakeh.go"</title>
<updated>2024-03-22T13:12:34Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2024-03-22T13:11:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=62bf073d3d5b55a7e76cf5d9cebefdc9c00cbcee'/>
<id>urn:sha1:62bf073d3d5b55a7e76cf5d9cebefdc9c00cbcee</id>
<content type='text'>
The "share" project has been moved to SourceHut with new name
"pakakeh.go".
</content>
</entry>
<entry>
<title>all: write the output as is when sending with server-sent events</title>
<updated>2023-12-03T17:20:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-12-02T17:38:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=775af78cc6c8ebe9e258b81dd9442bbe6b8b36d4'/>
<id>urn:sha1:775af78cc6c8ebe9e258b81dd9442bbe6b8b36d4</id>
<content type='text'>
Previously, if the command output is "line1\n\nline2\n", the web output
it as

  line1
  line2

it should be

  line1

  line2

This fix the empty line not displayed in wui output.
</content>
</entry>
<entry>
<title>all: handle reconnecting when streaming execution</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-27T12:11:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=22ad970d426c07bb36c3f71856ba16183377a5f4'/>
<id>urn:sha1:22ad970d426c07bb36c3f71856ba16183377a5f4</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>all: implement HTTP API to fetch execution output by ID</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-26T14:44:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=d46473cf2d8b224443352c6d5f617a64312af793'/>
<id>urn:sha1:d46473cf2d8b224443352c6d5f617a64312af793</id>
<content type='text'>
The new API is "GET /awwan/api/execute/tail" that implement Server-sent
events, not a normal GET request.
Its accept the query parameter "id" with value is the execution ID
from "/awwan/api/execute".

Once called with valid ID, it will streaming the command output
to client.

By using this new API, the WUI can receive the output of command
immediately without waiting for all commands to be completed.

Implements: https://todo.sr.ht/~shulhan/awwan/5
Signed-off-by: Shulhan &lt;ms@kilabit.info&gt;
</content>
</entry>
<entry>
<title>all: refactoring HTTP endpoint for Execute</title>
<updated>2023-12-01T06:17:30Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-22T06:16:21Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=a73f0d5d0108e2e10d89f93c7867addbe073add9'/>
<id>urn:sha1:a73f0d5d0108e2e10d89f93c7867addbe073add9</id>
<content type='text'>
Previously, the Execute endpoint wait for command execution to finish.
In case the command takes longer than proxy or server write timeout, it
will return with an timeout error to client.

In this changes, we generate an execution ID for each request and return
it immediately.
The next commit will implement HTTP endpoint to fetch the latest status
and/or output by execution ID.

References: https://todo.sr.ht/~shulhan/awwan/5
</content>
</entry>
<entry>
<title>all: refactoring, rename HttpResponse to ExecResponse</title>
<updated>2023-11-16T16:00:59Z</updated>
<author>
<name>Shulhan</name>
<email>ms@kilabit.info</email>
</author>
<published>2023-11-16T16:00:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/awwan/commit/?id=06093ed39d7f1e4a7b0e49f9963d2ad2d108d3bd'/>
<id>urn:sha1:06093ed39d7f1e4a7b0e49f9963d2ad2d108d3bd</id>
<content type='text'>
</content>
</entry>
</feed>
