Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/** Maximum permitted key length in characters (bytes after UTF-8 encoding may be larger). */
export const MAX_KEY_LENGTH = 1024;
/** Default data-file extension appended to every key. */
export const DEFAULT_FILE_EXTENSION = ".data";
/** Default metadata-file extension appended to every key. */
export const DEFAULT_METADATA_EXTENSION = ".meta";
/** Default retry maximum attempts on transient filesystem errors. */
export const DEFAULT_RETRY_MAX_ATTEMPTS = 3;
/** Default retry base delay in milliseconds. */
export const DEFAULT_RETRY_BASE_DELAY_MS = 50;
/** Default retry maximum delay in milliseconds. */
export const DEFAULT_RETRY_MAX_DELAY_MS = 5_000;
/** Prefix used for atomic-write temp files. */
export const TEMP_FILE_PREFIX = ".tmp-";
/** Transient errno values that are eligible for retry. */
export const TRANSIENT_ERRNO_CODES = new Set([
"EBUSY",
"EMFILE",
"ENFILE",
"EAGAIN",
]);