mirror of
https://github.com/hanzoai/cloud.git
synced 2026-11-17 16:36:24 +00:00
The single Go binary that runs the compute/backend control plane: KMS secrets, object storage, DNS/provisioning, PaaS, code + exec, zero-trust sharing, audit, gateway edge, feature flags, security, and the plugin runtime — every subsystem mounted from one composition root. Open-core by construction, not by deletion. The proprietary planes — identity, commerce, AI inference, observability, the message bus, billing — are injected through the cloud/types extension interfaces, so this binary links only public infrastructure libraries and a missing plane mounts fail-closed and says so rather than pretending to work. Published from a fresh root rather than a filtered history: the extraction it came from began life without git, and a squashed root is the only way to be sure no earlier blob travels with it. Runs on a laptop with no Kubernetes, no cluster and no external services — `CLOUD_DEV_UNENCRYPTED=1 cloud -data-dir /tmp/cloud` boots ~32 subsystems on HTTP and ZAP. Encryption at rest stays fatal-by-default on a capable build; the dev flag relaxes only the no-key case, loudly. Co-authored-by: Hanzo Dev <[email protected]>
35 lines
1.5 KiB
Go
35 lines
1.5 KiB
Go
// Package clients holds the canonical ZAP-typed inter-subsystem
|
|
// clients used by cloud.Deps.
|
|
//
|
|
// Per HIP-0106 "Inter-subsystem contract": ZAP (the Hanzo native binary
|
|
// protocol). Every subsystem ships its public interface as a .zap
|
|
// schema; zapc generates Go bindings; cloud wires the in-process
|
|
// ZAP-typed Go interfaces when subsystems are co-resident, falls
|
|
// back to ZAP RPC over the wire when split.
|
|
//
|
|
// This package provides three factories per subsystem:
|
|
//
|
|
// - <Subsystem>InProcess(impl): wraps a co-resident implementation
|
|
// as a ZAP-typed client. Direct Go method calls. No marshalling,
|
|
// no network.
|
|
//
|
|
// - <Subsystem>RPC(addr): builds a ZAP-RPC client targeting a
|
|
// remote endpoint (used in split deployments).
|
|
//
|
|
// - Disabled<Subsystem>(): returns a typed nil that fails closed
|
|
// with a clear error message when called. Lets subsystem mount
|
|
// code defensively detect "the dep isn't wired" without nil
|
|
// dereferences.
|
|
//
|
|
// cloud.BuildDeps picks the right one for each subsystem based on
|
|
// cfg.Enabled(name) and the configured RPC endpoint.
|
|
//
|
|
// Note (zapc): the ZAP RPC wire format is exercised by hanzoai/zap
|
|
// (Rust impl) and hanzoai/zap-go (Go bindings). The current Go
|
|
// scaffolding here ships stubs sufficient to enforce the contract;
|
|
// the actual RPC dispatch sits behind a transport layer that
|
|
// subsystems will swap in as each subsystem ships its .zap schema +
|
|
// zapc-generated client. TODO(zapc-gen) markers identify the
|
|
// expansion points.
|
|
package clients
|