Documentation
¶
Overview ¶
Package journal stores capture records as an append-only wire-frame journal. A journal can be inspected after an interrupted writer and published without replacing an existing recording.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finalization ¶
type Finalization struct {
JournalPath string
Destination string
Session [16]byte
Records, Bytes uint64
}
Finalization describes the journal immediately before publication.
type FinalizeHook ¶
type FinalizeHook func(Finalization) error
type Journal ¶
type Journal struct {
// contains filtered or unexported fields
}
Journal is safe for concurrent Append calls. Append is bounded by Limits; it copies no more than the supplied record payload into the kernel writer.
func (*Journal) Append ¶
Append adds one record. A record from another session is rejected before touching the journal. SyncEach makes every successful append durable.
func (*Journal) Finalize ¶
func (j *Journal) Finalize(dst string, hook FinalizeHook) error
Finalize closes the journal, runs hook, and atomically publishes it at dst. The destination is created with a link operation, so an existing recording is never replaced. If the hook or publication fails, the source is retained.