Versions in this module Expand all Collapse all v0 v0.1.2 Apr 10, 2026 Changes in this version + const IntegrityModeCRC32 + const IntegrityModeMAC + const StatusDelivered + const StatusPending + const StatusPermanentFailure + type Entry struct + ActorID string + ActorType string + Destination string + IdempotencyKey string + Payload json.RawMessage + PayloadID string + Source string + Status string + Subject string + Timestamp time.Time + Version int + type Option func(*WAL) + func WithEncryption(key []byte) Option + func WithIntegrity(mode string, key []byte) Option + func WithSecurityEvent(fn SecurityEventFunc) Option + type SecurityEventFunc func(eventType string, attrs ...slog.Attr) + type WAL struct + func Open(dir string, maxSizeMB int64, logger *slog.Logger, opts ...Option) (*WAL, error) + func (w *WAL) Append(entry Entry) error + func (w *WAL) CRCFailures() int64 + func (w *WAL) Close() error + func (w *WAL) CurrentSegment() string + func (w *WAL) IntegrityFailures() int64 + func (w *WAL) MarkDelivered(payloadID string) error + func (w *WAL) MarkDeliveredBatch(payloadIDs []string) error + func (w *WAL) MarkPermanentFailure(payloadID string) error + func (w *WAL) PendingCount() int64 + func (w *WAL) Replay(fn func(Entry)) error + func (w *WAL) SampleDelivered(count int) ([]Entry, error) + type WALUpdater interface + MarkDelivered func(payloadID string) error + MarkDeliveredBatch func(payloadIDs []string) error + MarkPermanentFailure func(payloadID string) error