feat(valkey_sink): ValkeyEventSink -- first Valkey consumer (deploy-C §5.6)

Implement a bounded-mpsc + background-task Valkey event sink:
- XADD lifecycle events to a capped stream (MAXLEN ~ 10000).
- Fire-and-forget emit(): one mpsc::try_send, count-and-drop on full.
- Arc<AtomicU64> drop counter surfaced in /metrics.
- main.rs selects ValkeyEventSink when RUTSTER_VALKEY_URL is set and
  falls back to TracingEventSink otherwise.
- config::valkey_url validates redis:// / rediss://.
- CI services:valkey: block on test and clippy jobs.

Signed-off-by: Aaron D. Lee <himself@adlee.work>
This commit is contained in:
2026-07-06 03:04:10 -04:00
parent 2ac33cc01b
commit e6dc6fda14
9 changed files with 549 additions and 3 deletions

View File

@@ -29,6 +29,18 @@ jobs:
clippy:
runs-on: ubuntu-latest
services:
valkey:
image: valkey/valkey:latest
ports:
- 6379:6379
options: >-
--health-cmd "valkey-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
env:
VALKEY_URL: redis://127.0.0.1:6379/
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
@@ -41,9 +53,21 @@ jobs:
test:
runs-on: ubuntu-latest
services:
valkey:
image: valkey/valkey:latest
ports:
- 6379:6379
options: >-
--health-cmd "valkey-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
strategy:
matrix:
toolchain: [stable, "1.85"]
env:
VALKEY_URL: redis://127.0.0.1:6379/
steps:
- uses: actions/checkout@v4