Pure: how each consumer of a stack run is wired to the instances it resolved (hc-5, decision 20261122141106-2d375c4f).
Network aliases model: the consumer attaches only to its view network
hive-<run>-<consumer> and every bound instance joins it under its
original service names, so a provider's :env (KAFKA_BROKERS=kafka:9092)
is right as written and is never rewritten.
The env a consumer receives, layered low to high:
:env (by capability; two instances
setting one key to different values is a Result error naming both and
the key), then for each provider with :tenancy {:env VAR} VAR = the
consumer's tenancy prefix <run>.<consumer>., then extra-envs, a seq
of Env maps in order (the OTLP hook: hive-compose.promote.otel).consumer-env), per key.Secret references ({:pass path}) stay references: they are read only at
spawn (hive-compose.adapter.secrets); show a Wiring through
hive-compose.promote.env/rendered.
Pure: how each consumer of a stack run is wired to the instances it
resolved (hc-5, decision 20261122141106-2d375c4f).
Network aliases model: the consumer attaches only to its view network
`hive-<run>-<consumer>` and every bound instance joins it under its
original service names, so a provider's `:env` (`KAFKA_BROKERS=kafka:9092`)
is right as written and is never rewritten.
The env a consumer receives, layered low to high:
1. injected: each bound provider's `:env` (by capability; two instances
setting one key to different values is a Result error naming both and
the key), then for each provider with `:tenancy {:env VAR}` VAR = the
consumer's tenancy prefix `<run>.<consumer>.`, then `extra-envs`, a seq
of Env maps in order (the OTLP hook: `hive-compose.promote.otel`).
2. the consumer's own env (`consumer-env`), per key.
3. forced: HIVE_RUN_ID=<run> and hive.run.id=<run>.
Throughout, OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL are
one unit (a map naming either replaces both; a result with only one is an
error), OTEL_RESOURCE_ATTRIBUTES is merged per key (comma-separated k=v,
later wins), and finally hive.run.id=<run> and HIVE_RUN_ID=<run> are
forced.
Secret references (`{:pass path}`) stay references: they are read only at
spawn (`hive-compose.adapter.secrets`); show a Wiring through
`hive-compose.promote.env/rendered`.(consumer-env settings consumer)The consumer's own Env: :suite/env of a suite suite:<id>, else
:project/env of its project. It overlays the injected env (layer 2).
The consumer's own Env: `:suite/env` of a suite `suite:<id>`, else `:project/env` of its project. It overlays the injected env (layer 2).
(consumer-needs settings consumer)The Needs a consumer declared: a project id or a section <project>/<target>
reads its project's :project/needs, a suite suite:<id> its :suite/needs.
The Needs a consumer declared: a project id or a section `<project>/<target>` reads its project's `:project/needs`, a suite `suite:<id>` its `:suite/needs`.
(merge-attributes ss)The attribute strings ss merged per key with
otel/merge-resource-attributes: a later value wins, a key keeps the
position it first had, an entry with no = or an empty key is dropped:
(merge-attributes ["a=1,b=2" "b=3"]) => "a=1,b=3".
The attribute strings `ss` merged per key with `otel/merge-resource-attributes`: a later value wins, a key keeps the position it first had, an entry with no `=` or an empty key is dropped: (merge-attributes ["a=1,b=2" "b=3"]) => "a=1,b=3".
Keys that only travel together: an endpoint without its protocol (or the reverse) makes an SDK guess, so they are set and replaced as one unit.
Keys that only travel together: an endpoint without its protocol (or the reverse) makes an SDK guess, so they are set and replaced as one unit.
(service-env settings resolution run consumer service & [extra-envs])Result<Env> service of consumer receives: the Wiring env restricted to
the capabilities whose Need lists service in :services (or lists none).
HIVE_RUN_ID, resource attributes and extra-envs reach every service.
Result<Env> `service` of `consumer` receives: the Wiring env restricted to the capabilities whose Need lists `service` in `:services` (or lists none). HIVE_RUN_ID, resource attributes and `extra-envs` reach every service.
(wiring settings resolution run consumer & [extra-envs])Result<Wiring> of consumer in run: its view network, the instances it
is bound to in resolution with their aliases, its env (see the ns doc)
and its tenancy prefix. extra-envs is a seq of Env maps merged in
order over the providers' env and under the consumer's own env.
Result<Wiring> of `consumer` in `run`: its view network, the instances it is bound to in `resolution` with their aliases, its env (see the ns doc) and its tenancy prefix. `extra-envs` is a seq of Env maps merged in order over the providers' env and under the consumer's own env.
(wirings settings resolution run & [extra-envs-fn])Result<{consumer Wiring}> for every consumer bound in resolution.
extra-envs-fn, (fn [consumer] [Env ...]), supplies each one's extra envs.
Two consumers whose ids slug alike ("billing/api", "billing-api") would
share a view network and a tenancy prefix: that is a
:compose/consumer-name-collision naming both.
Result<{consumer Wiring}> for every consumer bound in `resolution`.
`extra-envs-fn`, (fn [consumer] [Env ...]), supplies each one's extra envs.
Two consumers whose ids slug alike ("billing/api", "billing-api") would
share a view network and a tenancy prefix: that is a
:compose/consumer-name-collision naming both.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |