Commit graph

14 commits

Author SHA1 Message Date
8a60f89110 Fix small JSON bugs, bring in test suite
Just decided to "harden" the JSON parser a little bit with the test
suite from https://github.com/nst/JSONTestSuite. Now I'm pretty sure
that we can handle whatever JSON docker throws at us.
2024-08-06 09:22:11 -07:00
1f19792c58 Merge branch 'main' into quodlibetor/support-server-logs 2024-08-06 06:39:14 -07:00
5e96b37f5b Docker support
This is the most basic kind of docker querying you will find. Does not
support HTTPS. Seems to work for local docker engines. Has not been
tested against remote docker engines, or full URLs.

Note that if you want this to work you'll have to configure docker to
allow manipulation without being root, i.e., the user you connect as
will need to be in the `docker` group.

This was done instead of pulling in the `bollard` crate. Maybe I'm
being silly, but `bollard` uses a whole lot of other crates in the
name of being general and robust. These crates, however, add an
unacceptable size to the final binary. (In the experiment I ran, on a
release build, the binary size went from 2904696 to 4840968 bytes: an
increase of 1.8 MB. With this patch the release binary is 2986360
bytes, which is an increase of 80k.)

I wanted to see exactly what I could get away with when it came to
talking to docker. This here actually seems like a fine compromise:
HTTP is very simple if you only have to worry about one specific
server, and JSON is not very hard to parse if you don't care too much
about error handling, or are willing to play fast and loose with
punctuation (which I am).
2024-08-05 12:04:26 -07:00
Brandon W Maister
18da61ed32 make server logging show messages in the frontend
now you can use the log crate and get messages in the frontend.
2024-08-05 16:59:41 +01:00
8135f163f2 Refresh is async
Now we are ready for more asyncery (e.g., docker)
2024-08-04 08:29:33 -07:00
c2c57289cf Refactor refresh
Moving different mechanisms into different conditionally-compiled
modules. This way it can be extended, e.g. with docker lookups, MacOS
support, etc.
2024-08-04 08:14:19 -07:00
3eba65f6e6 Refactor in prep for clip 2024-06-22 07:32:11 -07:00
3f7afc5b78 More clippy 2024-06-22 06:13:09 -07:00
00daedeb95 Some silly refactoring 2023-11-25 07:57:52 -08:00
d6c9ae8d71 Move browser code to core crate 2022-12-17 08:48:57 -08:00
d6a2b6bdf6 Fix non-unix build 2022-12-17 08:19:56 -08:00
d63ceb730f Initial browse support, server side 2022-12-17 08:12:30 -08:00
6f906d80a7 Protocol version, async pump, start some testing 2022-12-16 13:57:52 -08:00
86ea099b2c Split client and server into modules 2022-10-17 19:57:47 -07:00