persist

package
v0.10.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package persist is INTERNAL-ONLY — corrupt-file quarantine and warning recovery. Pure infrastructure with no operator-facing contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuarantineCorruptFile

func QuarantineCorruptFile(path string, cause error) error

QuarantineCorruptFile renames a corrupt file aside so the caller can recover with a clean in-memory value. Rename failures are returned as hard errors.

func WriteFileAtomic added in v0.7.0

func WriteFileAtomic(path string, data []byte, perm os.FileMode) error

Types

type RecoveryWarning

type RecoveryWarning struct {
	Path       string
	BackupPath string
	Cause      error
}

RecoveryWarning reports that a corrupt local persistence file was quarantined and the caller can continue with an empty in-memory store.

func (*RecoveryWarning) Error

func (w *RecoveryWarning) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL