channel_log: shared disk logging with round-trip

Move IRC's disk logging to thalamus/channel_log.rs as shared
functions: append_disk_log() and load_disk_log(). Any daemon
can use them — opt-in, not mandatory (tmux won't use them).

load_disk_log() populates a ChannelLog from disk on startup,
so history survives daemon restarts.

IRC daemon now uses the shared functions.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 13:17:38 -04:00
parent a6ffe9e086
commit 58737a2cef
5 changed files with 72 additions and 17 deletions

13
Cargo.lock generated
View file

@ -2593,6 +2593,7 @@ dependencies = [
"rustls-platform-verifier",
"serde",
"serde_json",
"serde_urlencoded",
"sync_wrapper",
"tokio",
"tokio-rustls",
@ -2902,6 +2903,18 @@ dependencies = [
"zmij",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
"itoa",
"ryu",
"serde",
]
[[package]]
name = "sha2"
version = "0.10.9"