Expand description
Registry of sealed-boot embedded xslt/xsd/sql assets; see the module docs. Process-global registry of embedded xslt/xsd/sql assets (mission 351).
Sealed artifacts carry their xslt/xsd/sql resources as verbatim store
assets. At boot, camel-cli registers every xslt-, xsd-, and
sql-class entry here under its store path (assets/xslt/t.xslt)
from digest-verified store entries, and rewrites the corresponding
endpoint/site references to camel-embedded:<asset path>. The
in-process resolvers read such references from this registry — no
file is written for those classes, so a sealed artifact boots on a
host with no writable temp directory. This module mirrors the
camel-proto-compiler::embedded registry (mission 350) that serves
the proto class; the two live in separate leaf crates because the
proto compiler and this API crate cannot depend on each other.
§Reserved reference prefix
crate::embedded_assets::EMBEDDED_REF_PREFIX (camel-embedded:) and its percent-encoded
spelling (camel-embedded%3A) are reserved: a value that starts with
either spelling is resolved against this registry and never against
the filesystem. A real file whose name starts with either spelling is
therefore shadowed — an accepted reservation, documented here and in
the consuming components’ acceptance rules.
Resolution fails closed: a reference whose key was never registered
resolves to None, and the caller reports a boot error instead of
falling back to the host filesystem.
Constants§
- EMBEDDED_
REF_ PREFIX - Prefix marking an in-memory asset reference:
camel-embedded:<asset path>. Reserved across the workspace; see the module documentation.
Functions§
- get
- Returns the bytes registered under
name, orNonewhen the name is not registered (the reference then fails closed at resolution). - register
- Registers
bytesundername(the store asset path, e.g.assets/xslt/t.xslt). A later registration for the same name replaces the earlier bytes. Idempotent and infallible: the registry is populated once per boot from verified store entries. - resolve_
ref - Resolves an embedded asset reference to its registered bytes.