Documentation
¶
Overview ¶
Package flock wraps advisory whole-file locks. Two callers need them: the capture spool, which marks a segment live for as long as a writer holds it open (so recovery can tell "a call is in flight" from "a process died mid-call"), and the per-emitter monotonic counter, whose read-increment-write must be atomic across concurrent proxy processes sharing one state directory (Q48 — a duplicated counter would read as a gap that never happened).
Locks are per open file description, so they serialize between processes and between two handles in one process alike.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock is a held advisory lock.
Click to show internal directories.
Click to hide internal directories.