subsystems

package
v1.799.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: Apache-2.0 Imports: 81 Imported by: 0

Documentation

Overview

Package subsystems is the composition root: the single, explicit list of which Hanzo cloud subsystems are linked into the binary AND the order they mount in.

Wire() returns []cloud.MountSpec in mount order (slice position == order). There is no init()-registry and no order-int: adding, removing, or reordering a subsystem is a one-line edit to Wire(), read top-to-bottom. cmd/cloud and cmd/hanzo both call Wire() and thread the slice into cloud.Serve — the set is defined ONCE, here.

(This package must NOT live in package cloud: the subsystems import cloud for Deps + Typed, so a root-package bundle would form an import cycle. As a sibling subpackage it composes them without one.)

HIP-0106: the unified cloud binary is the APPLICATION layer plus the embedded KMS secrets plane and the embedded IAM identity plane ("one Go binary embeds IAM + KMS + o11y"). The edge/infra tier (mcp, gateway, ingress-edge) runs as its own deployments for blast-radius isolation; several application folds (iam, base, commerce, captable, dataroom, sign, ingress) are STAGED — linked here but mounted only when the operator names them in CLOUD_ENABLE.

Ordering provenance: order-int ascending; ties in the exact order the pre-refactor init()-registry mounted them, captured empirically from origin/main @c504d2b (68 self-registering specs) and frozen by TestWireOrderMatchesFrozen (wire_test.go). ai (@150) and the hanzoai/o11y module wildcard (@70) are NOT in that dump: on their wave-2 tags (ai v1.805.2, o11y v1.5.12) they no longer self-register, so origin/main currently DROPS them (a latent regression this composition root fixes). They are wired back at their order-int slots — o11y-ext kept adjacent to the in-repo o11y read-plane (@69); ai as the last /v1/* catch-all before plugins (@900). Do not re-sort; edit positions deliberately.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wire

func Wire() []cloud.MountSpec

Wire returns every linked subsystem as a cloud.MountSpec, in mount order. The slice position IS the order: cloud.MountAll iterates it as-given, registering each subsystem's teardown as a zip shutdown hook so teardown runs in reverse (LIFO). Enablement is a separate axis: cloud.Serve mounts only the specs cfg.Enabled(name) admits, so a STAGED subsystem is linked but inert until named.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL