code wiki / (root) / nx_kv_store.nx

nx_kv_store.nx

buildroot/runtime/nx_kv_store.nx

11842 B349 linesdepth 0pulls 0 transitivereach 5 importersview sourcekind librarytopic kv
docsdependenciesstructsconstsfunctions

about

nx_kv_store.nx -- Provides an append-only key-value store with linear-scan index for session and config persistence.

dependencies 0 imports · 5 importers

nx_kv_store.nx nx_admin_login_flow.nx nx_kv_store_test.nx nx_wiki_https_daemon.nx nx_wiki_https_daemon_mv.nx nx_wiki_main.nx

imports: none

imported by: nx_admin_login_flow.nxnx_kv_store_test.nxnx_wiki_https_daemon.nxnx_wiki_https_daemon_mv.nxnx_wiki_main.nx

structs

75struct NxKvStore

consts

2const NXKV_MAGIC_1099511628211: i64 = 1099511628211
49const NXKV_OK: i64 = 0
50const NXKV_NOT_FOUND: i64 = 1
51const NXKV_OOM_DATA: i64 = 2
52const NXKV_OOM_INDEX: i64 = 3
53const NXKV_BAD_RECORD: i64 = 4
54const NXKV_BAD_ARG: i64 = 5
55const NXKV_VERDICT_N: i64 = 6
87const NX_KV_STORE_BYTES: i64 = 48 // 6 i64 fields

functions

57func nxkv_verdict_is_valid(v: i64) -> i64
called by 1: main
63func nxkv_verdict_name(v: i64) -> *u8
called by 1: main
93func nx_kv_store_init(
called by 3: mainmainmain
113func nxkv_fnv1a_64(bytes: *u8, n: i64) -> i64
127func nxkv_put_u32_be(buf: *u8, off: i64, v: i64) -> i64
called by 1: nx_kv_store_put
135func nxkv_get_u32_be(buf: *u8, off: i64) -> i64
144func nxkv_put_i64_be(buf: *u8, off: i64, v: i64) -> i64
155func nxkv_get_i64_be(buf: *u8, off: i64) -> i64
169func nxkv_index_entry_offset(kv: *NxKvStore, i: i64) -> i64
173func nxkv_index_get_hash(kv: *NxKvStore, i: i64) -> i64
177func nxkv_index_get_record_off(kv: *NxKvStore, i: i64) -> i64
181func nxkv_index_set_entry(kv: *NxKvStore, i: i64,
195func nxkv_find_record_off(kv: *NxKvStore,
229func nx_kv_store_put(
273func nx_kv_store_get(
295func nx_kv_store_contains(
308func nx_kv_store_len(kv: *NxKvStore) -> i64
called by 1: main
313func nx_kv_store_bytes_used(kv: *NxKvStore) -> i64
called by 1: main
324func nx_kv_store_replay(kv: *NxKvStore, pre_loaded_n: i64) -> i64