Repository navigation
v0.2.0 — Inherited-Lock PID File + API Redesign
Breaking Changes
Stop()→Stop(ctx)— callers must pass contextProxy(ctx, port, path)→Proxy(ctx, cfg, ProxyOptions)— testable I/OSetHandler()deleted — dead codeIsAlive()based on pidlock (lock held = alive)
Architecture: Inherited-Lock PID File
PID file IS the lock. Correct by construction on all platforms.
- Unix: flock + fd inheritance via ExtraFiles
- Windows: share-mode + startup LockFileEx
- Startup lock protocol: two locks, two purposes, correct ordering
- N12 recovery: holder dies → next waiter becomes starter
- LockCtx: ctx-aware locking with LOCK_NB poll
New Features
- Sentinel errors (
ErrNotRunning,ErrAlreadyRunning, etc.) Config.Validate()— rejects invalid names, pathsPOST /daemon/shutdown— cross-platform graceful stopProxyOptions— testable stdin/stdout, opt-in payload logging- CAS Disconnect, EINTR retry
Verified
- 13 review rounds
- 5 integration tests (helper-process pattern)
- CI green on Linux + macOS + Windows
- Coverage: 71.4% daemon, 86.2% internal, 75% pidlock