barryp and Claude Fable 5.1
ab163ca5e6
Fix clippy warnings in repository tests
...
Use assert!/assert!(!..) instead of assert_eq! against literal bools,
and drop a needless borrow.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01Kmrgkpp9YBJ6AMaWYPPZuD
2026-09-12 13:06:28 -07:00
barryp and Claude Fable 5.1
6385be0890
Handle SIGTERM/SIGINT for a graceful shutdown
...
Running as PID 1 in a container, the daemon silently dropped SIGTERM,
so `docker stop` always hit the 10s timeout and SIGKILL, and host
reboots waited on it.
The accept loop now polls a non-blocking listener and a shutdown flag
registered via signal-hook. On SIGTERM or SIGINT it stops accepting,
gives in-flight requests up to 3s to finish, removes the socket file,
and exits with status 0. Log lines mark signal receipt and completion.
Adds integration tests that spawn the binary, perform an auth
round-trip, signal it, and assert a clean exit and socket removal.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01Kmrgkpp9YBJ6AMaWYPPZuD
2026-09-12 13:05:20 -07:00
Barry Pederson
1de0fa16db
Add some logging so that with the env variable RUST_LOG=debug or similar, there is timestamped output to stderr
2026-02-03 15:57:11 -08:00
Barry Pederson
a03b738c7a
Add argon2 password hashing
2026-02-03 12:59:01 -08:00
Barry Pederson
3fac9def78
I think I've got the workspace thing figured out..how the Cargo.toml files should reference each other
2025-02-21 15:11:31 -08:00
Barry Pederson
e5f2bbf64e
clap and common need to be dependencies under the server directory, despite what rustrover says
2025-02-21 14:32:35 -08:00
Barry Pederson
93ad2cc8a7
Updated to Rust 2024 edition
2025-02-21 14:24:57 -08:00
Barry Pederson
da84d2d6b9
rename 'handler' to 'repository' for clarity
2024-11-30 12:44:34 -08:00
Barry Pederson
60bc980e8d
Simplify test code a bit, use Request::new() to simplfy constructing requests
2024-11-03 12:49:23 -08:00
Barry Pederson
4d70463e46
Make handler.rs generic for anything that implements Read+Write, add unittest taking advantage of that.
...
Also, it'll work now for things other than UnixStreams, such as TcpStreams
2024-11-03 12:19:02 -08:00
Barry Pederson
5f4a0e0e88
Reorganize and refactor, adding integration test for common library stuff
2024-11-03 11:44:03 -08:00
Barry Pederson
00743fbe9c
Reame listener.rs to server.rs for clarity
2024-11-03 10:38:40 -08:00
Barry Pederson
7cd2ba3364
Rename server.rs to handler.rs for clarity, since this is responsible for handling one interaction with a client
2024-11-03 10:31:31 -08:00
Barry Pederson
1a66c8ede5
Rename handler.rs to repository.rs for clarity, pass the directory name as a new() parameter rather than have the repository aware of the OPTIONS static
2024-11-03 10:28:14 -08:00
Barry Pederson
52f502f7a6
Simplify Cargo.toml dependencies
...
Still need two copies of the dependencies, but at least they're in one place now.
2024-11-02 16:07:05 -07:00
Barry Pederson
076e48f457
Add a separate client binary, with some common code to the server.
...
The cargo workspace thing was a PITA to figure out, but it seems to be working. Could maybe be simplified?
2024-11-02 15:58:35 -07:00