Skip to main content

Module file_storage

Module file_storage 

Source
Expand description

File-system-based storage backend for certon.

This module implements Storage using the local file system. Highlights:

  • Atomic writes โ€” data is first written to a temporary file in the same directory, then renamed into place so that readers never see a partial write.
  • Distributed locking โ€” lock files containing a JSON timestamp are created atomically. A background keepalive task periodically updates the timestamp; stale locks whose timestamp exceeds twice the freshness interval are automatically removed.
  • Platform-aware defaults โ€” the default storage path follows OS conventions (~/.local/share/certon on Linux, ~/Library/Application Support/certon on macOS, %APPDATA%/certon on Windows).

Structsยง

FileStorage