16 Commits

Author SHA1 Message Date
Gabriella Gonzalez
4ac870a142
Restructure NAR streaming to remove one pointer indirection (#2)
We can pass the two fields directly via the FFI instead of
bundling them in a `String_` struct
2022-08-29 11:35:58 -07:00
Gabriella Gonzalez
0242d8bebb
Add support for streaming NAR output (#1)
Before this change the NAR contents would be buffered in memory before
supplying them to the client.  Now each chunk is instantly flushed
to the client when it's available.

This requires reworking things so that we use a `StreamingBody`,
which in turn requires passing a Haskell callback to the C code to
invoke.
2022-08-23 16:32:34 -07:00
Gabriella Gonzalez
027398c9e9
Increase default timeout (#2)
... and make the timeout configurable
2022-07-06 12:31:19 -07:00
Gabriella Gonzalez
eaceeeb8ce
Remove spurious print statement (#1)
I accidentally left this over from debugging the log endpoint
2022-07-06 09:22:29 -07:00
Gabriella Gonzalez
f74b94a24a Fix URL returned in narinfo
It was missing the `.nar` suffix
2022-07-01 15:00:29 -07:00
Gabriella Gonzalez
1881b0385b Fix potential bug when marshalling string struct 2022-07-01 12:54:58 -07:00
Gabriella Gonzalez
dbf735e77f Fix /log/ endpoint
The old logic would fail to return a result if a later
substituter didn't have the log file, even if an older

This also simplifies the logic.
2022-07-01 12:29:28 -07:00
Gabriella Gonzalez
614ed2ca65 Remove dependence on bsd-sysctl package
… since it doesn't work on Linux
2022-06-30 15:59:38 -07:00
Gabriella Gonzalez
24fb4b7fea Add support for /log/ API 2022-06-30 15:45:40 -07:00
Gabriella Gonzalez
3bd298c02a Add support for /nar/*.nar endpoint 2022-06-30 15:06:41 -07:00
Gabriella Gonzalez
7f1251cc47 Return 400 status for invalid hashes 2022-06-30 13:42:34 -07:00
Gabriella Gonzalez
9e5e5f45f3 Add support for signatures 2022-06-15 15:40:13 -07:00
Gabriella Gonzalez
8e9c9198fe Add support for --quiet and --verbose options 2022-06-15 12:44:21 -07:00
Gabriella Gonzalez
39945d0743 Factor out Application logic 2022-06-15 12:24:00 -07:00
Gabriella Gonzalez
91eab58f28 Use ExceptT to simplify indentation 2022-06-15 11:01:08 -07:00
Gabriella Gonzalez
ddcf0a04db Initial commit 2022-06-15 10:21:24 -07:00