CoRIM Store (V2)#
Fetches CoRIM bodies from rim-locator URLs for the local verifier.
Configure it, then inject it into nvat_local_corim_verifier_create.
Functions#
- nvat_rc_t nvat_corim_store_add_allowed_url_prefix(nvat_corim_store_t store, const char *prefix)
Append an https:// prefix to the raw-URL allowlist checked before any rewrite.
- nvat_rc_t nvat_corim_store_add_url_rewrite(nvat_corim_store_t store, const char *pattern, const char *replacement)
Append a rim-locator URL rewrite rule (prefix substitution).
- nvat_rc_t nvat_corim_store_create(nvat_corim_store_t *out_store, const char *service_key, const nvat_http_options_t http_options)
Create a CoRIM store seeded with the NVIDIA RIM allowlist prefix.
- nvat_rc_t nvat_corim_store_enable_in_memory_cache(nvat_corim_store_t store, uint64_t max_size_bytes, time_t ttl_seconds)
Enable in-memory LRU+TTL caching on a CoRIM store.
- void nvat_corim_store_free(nvat_corim_store_t *store)
Typedefs#
- nvat_corim_store_t
Opaque handle to a CoRIM store.
Functions#
- nvat_rc_t nvat_corim_store_add_allowed_url_prefix(
- nvat_corim_store_t store,
- const char *prefix,
Append an https:// prefix to the raw-URL allowlist checked before any rewrite.
- nvat_rc_t nvat_corim_store_add_url_rewrite(
- nvat_corim_store_t store,
- const char *pattern,
- const char *replacement,
Append a rim-locator URL rewrite rule (prefix substitution).
When a rim-locator URL starts with
pattern, the prefix is replaced withreplacementbefore fetching. Rules apply in insertion order; first match wins. The pre-rewrite URL must still pass the allowlist, so rules redirect the allowed endpoint to file:// mirrors or staging hosts without weakening the input gate.
- nvat_rc_t nvat_corim_store_create(
- nvat_corim_store_t *out_store,
- const char *service_key,
- const nvat_http_options_t http_options,
Create a CoRIM store seeded with the NVIDIA RIM allowlist prefix.
- Parameters:
out_store – On success, receives the store handle. Free with nvat_corim_store_free.
service_key – Service key for https RIM fetches. Pass NULL or “” for none.
http_options – HTTP options. NULL uses defaults.
- nvat_rc_t nvat_corim_store_enable_in_memory_cache(
- nvat_corim_store_t store,
- uint64_t max_size_bytes,
- time_t ttl_seconds,
Enable in-memory LRU+TTL caching on a CoRIM store.
Subsequent calls to the store’s internal fetch path check the cache before making any network or filesystem request. The cache key is the effective URL after rewrites. Must be called before nvat_local_corim_verifier_create transfers ownership of the store.
- Parameters:
store – The store to configure. Must not be NULL.
max_size_bytes – Maximum total byte capacity of the cache. Must be > 0.
ttl_seconds – Time-to-live for each cached entry in seconds. Must be >= 0.
- Returns:
NVAT_RC_OK on success, NVAT_RC_BAD_ARGUMENT if store is NULL, max_size_bytes is 0, or ttl_seconds is negative.
-
void nvat_corim_store_free(nvat_corim_store_t *store)#
Typedefs#
-
typedef struct nvat_corim_store_st *nvat_corim_store_t#
Opaque handle to a CoRIM store.