Documentation
¶
Overview ¶
Package catalogsync is the REVERSE half of the storefront loop: it consumes the commerce COMMERCE stream and turns each `commerce.product.created` into ONE content.EnsureCatalogAsset call, so a newly-created catalog product gets its ecom asset rendered (design == slug) — the mirror of the forward edge (apps/content storefront.go) that publishes a rendered asset back onto the product image.
It is a thin, in-process consumer subsystem: the mapping/idempotency/skip logic lives in the content lane (content.EnsureCatalogAsset); this package owns ONLY "read the product event off NATS and dispatch it". Decomplected from commerce and content — the COMMERCE stream is the seam, so neither imports the other; catalogsync imports both.
ALWAYS ON, against the ONE bus. It consumes the COMMERCE stream on pubsub.URL — the same embedded server every other app in this process reads, which always serves and fails boot closed. It used to require a knob of its own (CLOUD_COMMERCE_NATS_URL) that no manifest set, so the reverse edge was permanently inert while the bus it needed was running the whole time: an opt-in for a state that does not exist. A commerce publisher that is not wired simply produces no events, which this consumer already handles by waiting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.