Directories
¶
| Path | Synopsis |
|---|---|
|
api
|
|
|
gen/zattera/v1
Package zatterav1 is a reverse proxy.
|
Package zatterav1 is a reverse proxy. |
|
cmd
|
|
|
zattera
command
zattera is the single binary: CLI, control-plane node and worker node.
|
zattera is the single binary: CLI, control-plane node and worker node. |
|
internal
|
|
|
appconfig
Package appconfig parses the per-app zattera.toml (spec §4) into the proto shapes ApplyAppConfig consumes, and computes the deterministic config hash that identifies a release's effective configuration.
|
Package appconfig parses the per-app zattera.toml (spec §4) into the proto shapes ApplyAppConfig consumes, and computes the deterministic config hash that identifies a release's effective configuration. |
|
cli
Package cli implements every user-facing command.
|
Package cli implements every user-facing command. |
|
cli/cliconfig
Package cliconfig manages the CLI-side configuration (~/.config/zattera/config.toml): named contexts pointing at clusters, with tokens.
|
Package cliconfig manages the CLI-side configuration (~/.config/zattera/config.toml): named contexts pointing at clusters, with tokens. |
|
cli/ui
Package ui centralizes CLI output: lipgloss styles, success/error lines in the Vercel-style format, tables, and a --json mode that suppresses all decoration.
|
Package ui centralizes CLI output: lipgloss styles, success/error lines in the Vercel-style format, tables, and a --json mode that suppresses all decoration. |
|
cloud/provider
Package provider is a production cloud-infrastructure client: it spins, inspects, and destroys VMs on a real provider (Hetzner today; others later).
|
Package provider is a production cloud-infrastructure client: it spins, inspects, and destroys VMs on a real provider (Hetzner today; others later). |
|
commands
Package commands assembles the cobra command tree.
|
Package commands assembles the cobra command tree. |
|
config
Package config loads and validates the zatterad server configuration.
|
Package config loads and validates the zatterad server configuration. |
|
daemon
Package daemon is the node runtime: control plane and/or worker, selected by config roles.
|
Package daemon is the node runtime: control plane and/or worker, selected by config roles. |
|
daemon/agent
Package agent is the node-side runtime that keeps a node in sync with the control plane.
|
Package agent is the node-side runtime that keeps a node in sync with the control plane. |
|
daemon/api
Package api hosts the public control-plane API.
|
Package api hosts the public control-plane API. |
|
daemon/archive
Package archive gives audit entries and events durability beyond their in-state rings (T-92).
|
Package archive gives audit entries and events durability beyond their in-state rings (T-92). |
|
daemon/backup
Package backup implements full-platform disaster recovery (spec §3.11, T-66): a leader backs up the raft state, the cluster CA material and the sealed data key to the same S3 object store the volume snapshots use; `zatterad restore` rebuilds a fresh single-node cluster from the latest backup.
|
Package backup implements full-platform disaster recovery (spec §3.11, T-66): a leader backs up the raft state, the cluster CA material and the sealed data key to the same S3 object store the volume snapshots use; `zatterad restore` rebuilds a fresh single-node cluster from the latest backup. |
|
daemon/builder
Package builder builds container images from source using a managed buildkitd (spec §3.4).
|
Package builder builds container images from source using a managed buildkitd (spec §3.4). |
|
daemon/ca
Package ca implements the embedded cluster certificate authority.
|
Package ca implements the embedded cluster certificate authority. |
|
daemon/github
Package github implements push-to-deploy: a webhook endpoint that turns GitHub push events into builds, and GitHub App authentication for cloning private repos and posting commit statuses (spec F9, T-37).
|
Package github implements push-to-deploy: a webhook endpoint that turns GitHub push events into builds, and GitHub App authentication for cloning private repos and posting commit statuses (spec F9, T-37). |
|
daemon/intdns
Package intdns is the per-node internal DNS resolver (F26).
|
Package intdns is the per-node internal DNS resolver (F26). |
|
daemon/leaderrunner
Package leaderrunner factors the "run this loop only while we hold raft leadership" boilerplate shared by every leader-gated control-plane loop (scheduler, orchestrator, dispatcher, janitors).
|
Package leaderrunner factors the "run this loop only while we hold raft leadership" boilerplate shared by every leader-gated control-plane loop (scheduler, orchestrator, dispatcher, janitors). |
|
daemon/livestate
Package livestate holds the leader's in-memory view of connected nodes: presence, last heartbeat time and the most recent live sample.
|
Package livestate holds the leader's in-memory view of connected nodes: presence, last heartbeat time and the most recent live sample. |
|
daemon/logstore
Package logstore defines the per-node log storage contract (spec §3.10).
|
Package logstore defines the per-node log storage contract (spec §3.10). |
|
daemon/mesh
Package mesh owns the WireGuard overlay (ADR-0003).
|
Package mesh owns the WireGuard overlay (ADR-0003). |
|
daemon/mesh/meshsock
Package meshsock is the custom wireguard-go conn.Bind (ADR-0003 Phase C/D): one UDP socket multiplexes WireGuard transport packets and disco probe frames, a per-peer path state machine upgrades hub-routed peers to direct or hole-punched UDP paths, and (Phase D) falls back to a TCP relay when no UDP path works.
|
Package meshsock is the custom wireguard-go conn.Bind (ADR-0003 Phase C/D): one UDP socket multiplexes WireGuard transport packets and disco probe frames, a per-peer path state machine upgrades hub-routed peers to direct or hole-punched UDP paths, and (Phase D) falls back to a TCP relay when no UDP path works. |
|
daemon/mesh/relay
Package relay is the Phase D DERP-lite fallback (ADR-0003): every control node runs an mTLS TCP relay; a meshsock node with no working UDP path frames its already-encrypted WireGuard packets as (dst node, payload) and the relay forwards them to the destination's connection.
|
Package relay is the Phase D DERP-lite fallback (ADR-0003): every control node runs an mTLS TCP relay; a meshsock node with no working UDP path frames its already-encrypted WireGuard packets as (dst node, payload) and the relay forwards them to the destination's connection. |
|
daemon/nodehealth
Package nodehealth holds the pure node-liveness decision types shared by the gossip failure detector (internal/daemon/mesh) and the liveness monitor (internal/daemon/api).
|
Package nodehealth holds the pure node-liveness decision types shared by the gossip failure detector (internal/daemon/mesh) and the liveness monitor (internal/daemon/api). |
|
daemon/nodeinfo
Package nodeinfo detects a node's static capacity (CPU / memory / disk) for registration in state.
|
Package nodeinfo detects a node's static capacity (CPU / memory / disk) for registration in state. |
|
daemon/notify
Package notify is the alert engine (T-74): the leader evaluates AlertRules against metrics (TSDB/livestate) and cluster events, and delivers firing and resolved notifications to NotificationChannels (webhook, Slack, email) with per-rule dedupe.
|
Package notify is the alert engine (T-74): the leader evaluates AlertRules against metrics (TSDB/livestate) and cluster events, and delivers firing and resolved notifications to NotificationChannels (webhook, Slack, email) with per-rule dedupe. |
|
daemon/proxy
Package proxy hosts the embedded L7/L4 proxy (tasks T-41..T-48).
|
Package proxy hosts the embedded L7/L4 proxy (tasks T-41..T-48). |
|
daemon/raftstore
Package raftstore wires hashicorp/raft to the in-memory state store (ADR-0004).
|
Package raftstore wires hashicorp/raft to the in-memory state store (ADR-0004). |
|
daemon/registry
Package registry implements Zattera's embedded OCI image registry (spec §3.5).
|
Package registry implements Zattera's embedded OCI image registry (spec §3.5). |
|
daemon/runtime
docker.go is the ONLY file permitted to import the Docker SDK (spec rule 3).
|
docker.go is the ONLY file permitted to import the Docker SDK (spec rule 3). |
|
daemon/scheduler
Package scheduler runs on the leader and reconciles desired replica counts into Assignments: it decides WHAT should run WHERE, writing only desired state (agents converge it, T-15).
|
Package scheduler runs on the leader and reconciles desired replica counts into Assignments: it decides WHAT should run WHERE, writing only desired state (agents converge it, T-15). |
|
daemon/secrets
Package secrets implements envelope encryption for cluster secrets (spec §3.13, design §2.10):
|
Package secrets implements envelope encryption for cluster secrets (spec §3.13, design §2.10): |
|
daemon/tlsmgr
Package tlsmgr manages TLS certificates for the ingress: ACME issuance via certmagic backed by the raft KV (cluster-wide, one issuer serialized by a distributed lock), and a dev mode that mints self-signed certs from the cluster CA on demand (T-44).
|
Package tlsmgr manages TLS certificates for the ingress: ACME issuance via certmagic backed by the raft KV (cluster-wide, one issuer serialized by a distributed lock), and a dev mode that mints self-signed certs from the cluster CA on demand (T-44). |
|
daemon/tsdb
Package tsdb defines the embedded time-series store contract (spec §3.10): per-series ring buffers, 15s raw resolution for 24h + 5m downsampled for 30d.
|
Package tsdb defines the embedded time-series store contract (spec §3.10): per-series ring buffers, 15s raw resolution for 24h + 5m downsampled for 30d. |
|
daemon/upgrade
Package upgrade resolves release artifacts for a rolling cluster upgrade (T-95).
|
Package upgrade resolves release artifacts for a rolling cluster upgrade (T-95). |
|
daemon/volumes
Package volumes implements the content-addressed snapshot engine (spec §3.11): a deterministic tar of a volume's host path is content-defined-chunked (FastCDC), each chunk is deduplicated by sha256, compressed (zstd), encrypted (AES-GCM), and stored as an object; a per-snapshot manifest lists the ordered chunk hashes.
|
Package volumes implements the content-addressed snapshot engine (spec §3.11): a deterministic tar of a volume's host path is content-defined-chunked (FastCDC), each chunk is deduplicated by sha256, compressed (zstd), encrypted (AES-GCM), and stored as an object; a per-snapshot manifest lists the ordered chunk hashes. |
|
pkgutil/clock
Package clock abstracts time for testability.
|
Package clock abstracts time for testability. |
|
pkgutil/ids
Package ids generates the ULID identifiers used for every first-class object.
|
Package ids generates the ULID identifiers used for every first-class object. |
|
pkgutil/platform
Package platform normalizes and matches OCI platform strings ("linux/amd64").
|
Package platform normalizes and matches OCI platform strings ("linux/amd64"). |
|
pkgutil/version
Package version carries the build version, stamped via -ldflags.
|
Package version carries the build version, stamped via -ldflags. |
|
state
Package state holds the full replicated cluster state in memory (ADR-0004).
|
Package state holds the full replicated cluster state in memory (ADR-0004). |
|
testutil/fakeruntime
Package fakeruntime is an in-memory ContainerRuntime for unit and simcluster tests.
|
Package fakeruntime is an in-memory ContainerRuntime for unit and simcluster tests. |
|
testutil/freeport
Package freeport hands out free TCP ports for tests.
|
Package freeport hands out free TCP ports for tests. |
|
testutil/simcluster
Package simcluster runs an in-process multi-node Zattera control plane for unit and chaos tests: real hashicorp/raft with in-memory transports, real FSM/state, fake container runtime, fake clock.
|
Package simcluster runs an in-process multi-node Zattera control plane for unit and chaos tests: real hashicorp/raft with in-memory transports, real FSM/state, fake container runtime, fake clock. |
|
pkg
|
|
|
apiclient
Package apiclient is the public Go client for the Zattera API.
|
Package apiclient is the public Go client for the Zattera API. |
Click to show internal directories.
Click to hide internal directories.