Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent is TASKS.md 3.1's transport boundary: the interface ADR 003 describes ("the reconciler and everything above the transport boundary never knows whether it's talking to a local in-process agent or a remote one over mTLS") but that Phase 1 never actually built, confirmed directly against this repo before writing this package: every reconcile controller (internal/reconcile/application, internal/reconcile/database) takes a bare docker.Runtime, and cmd/levelrail/main.go's dynamicSource hands every controller the same single local docker.Runtime with no node concept anywhere.
|
Package agent is TASKS.md 3.1's transport boundary: the interface ADR 003 describes ("the reconciler and everything above the transport boundary never knows whether it's talking to a local in-process agent or a remote one over mTLS") but that Phase 1 never actually built, confirmed directly against this repo before writing this package: every reconcile controller (internal/reconcile/application, internal/reconcile/database) takes a bare docker.Runtime, and cmd/levelrail/main.go's dynamicSource hands every controller the same single local docker.Runtime with no node concept anywhere. |
|
Package alerting implements TASKS.md 2.5/2.7: threshold rules over internal/telemetry's metrics and logs, and crashloop detection as a built-in rule kind sharing the same evaluate/notify path rather than a separate mechanism (see TASKS.md 2.5's own note on why).
|
Package alerting implements TASKS.md 2.5/2.7: threshold rules over internal/telemetry's metrics and logs, and crashloop detection as a built-in rule kind sharing the same evaluate/notify path rather than a separate mechanism (see TASKS.md 2.5's own note on why). |
|
Package api implements TASKS.md 1.9: the HTTP API the web frontend (1.10) and, later, the MCP layer both build on.
|
Package api implements TASKS.md 1.9: the HTTP API the web frontend (1.10) and, later, the MCP layer both build on. |
|
Package apiclient is the one HTTP client implementation for the control plane's versioned API (internal/api, mounted at /api/v1).
|
Package apiclient is the one HTTP client implementation for the control plane's versioned API (internal/api, mounted at /api/v1). |
|
Package backup drives a database backup end to end: dump a managed database container's data, stream it straight to an S3-compatible bucket, and record the attempt in store.BackupHistory.
|
Package backup drives a database backup end to end: dump a managed database container's data, stream it straight to an S3-compatible bucket, and record the attempt in store.BackupHistory. |
|
Package bitbucketapp implements OAuth2 and the small slice of Bitbucket Cloud's REST API this control plane needs once connected.
|
Package bitbucketapp implements OAuth2 and the small slice of Bitbucket Cloud's REST API this control plane needs once connected. |
|
Package brand provides the branding indirection layer this project requires: no product name is ever hardcoded in source.
|
Package brand provides the branding indirection layer this project requires: no product name is ever hardcoded in source. |
|
Package build drives container image builds through BuildKit's Go client (github.com/moby/buildkit/client), never by shelling out to `docker build` or the `docker` CLI, matching the same "no CLI shelling" rule the node communication layer follows.
|
Package build drives container image builds through BuildKit's Go client (github.com/moby/buildkit/client), never by shelling out to `docker build` or the `docker` CLI, matching the same "no CLI shelling" rule the node communication layer follows. |
|
Package catalog holds Levelrail's own curated set of one-click service templates (ADR 015).
|
Package catalog holds Levelrail's own curated set of one-click service templates (ADR 015). |
|
Package compose parses a Docker Compose file into Levelrail's own desired-state model, in two shapes depending on the caller.
|
Package compose parses a Docker Compose file into Levelrail's own desired-state model, in two shapes depending on the caller. |
|
Package cronexpr parses and evaluates standard 5-field cron expressions ("minute hour day-of-month month day-of-week", e.g.
|
Package cronexpr parses and evaluates standard 5-field cron expressions ("minute hour day-of-month month day-of-week", e.g. |
|
Package deploy is TASKS.md 1.4's build integration: it connects internal/spec's build declaration to internal/build's BuildKit client, and a successful build's output to internal/store's desired state, closing the loop the application controller (internal/reconcile/ application, TASKS.md 1.3) reads from on every reconcile.
|
Package deploy is TASKS.md 1.4's build integration: it connects internal/spec's build declaration to internal/build's BuildKit client, and a successful build's output to internal/store's desired state, closing the loop the application controller (internal/reconcile/ application, TASKS.md 1.3) reads from on every reconcile. |
|
Package deploylog is the glue between internal/build.ProgressEvent (the progress callback all three real deploy-attempt trigger paths already thread through internal/deploy.Pipeline.Deploy) and two real consumers: a persisted, replayable row in telemetry.db (internal/telemetry's deploy_logs table) and any currently-connected SSE viewer watching that same attempt live.
|
Package deploylog is the glue between internal/build.ProgressEvent (the progress callback all three real deploy-attempt trigger paths already thread through internal/deploy.Pipeline.Deploy) and two real consumers: a persisted, replayable row in telemetry.db (internal/telemetry's deploy_logs table) and any currently-connected SSE viewer watching that same attempt live. |
|
Package diagnose is a deterministic, pure-Go pattern matcher over diagnostic signals the platform already collects: deploy attempt status/error, reconcile condition reason strings, crashloop alert state, and recent log lines.
|
Package diagnose is a deterministic, pure-Go pattern matcher over diagnostic signals the platform already collects: deploy attempt status/error, reconcile condition reason strings, crashloop alert state, and recent log lines. |
|
Package docker wraps the Docker Engine API.
|
Package docker wraps the Docker Engine API. |
|
Package dockertest holds test helpers shared by every package whose _live_test.go files need a real Docker daemon (or other real, network-dependent infra) to run.
|
Package dockertest holds test helpers shared by every package whose _live_test.go files need a real Docker daemon (or other real, network-dependent infra) to run. |
|
Package email is the platform's one email-sending capability: a narrow Sender interface plus SMTP and SES implementations, shared by internal/alerting and internal/api so neither imports the other.
|
Package email is the platform's one email-sending capability: a narrow Sender interface plus SMTP and SES implementations, shared by internal/alerting and internal/api so neither imports the other. |
|
Package githubapp implements the GitHub App manifest registration flow, App-level JWT signing (RS256, per GitHub's own App authentication spec), and the small slice of the GitHub REST API this control plane needs once an App is connected: minting installation access tokens, listing an installation's repositories, and listing a repository's branches.
|
Package githubapp implements the GitHub App manifest registration flow, App-level JWT signing (RS256, per GitHub's own App authentication spec), and the small slice of the GitHub REST API this control plane needs once an App is connected: minting installation access tokens, listing an installation's repositories, and listing a repository's branches. |
|
Package gitlabapp implements OAuth2 and the small slice of GitLab's REST API this control plane needs once connected.
|
Package gitlabapp implements OAuth2 and the small slice of GitLab's REST API this control plane needs once connected. |
|
Package ingress is the Phase 0 spike for embedding Caddy as a Go library, driven entirely through its in-process admin API.
|
Package ingress is the Phase 0 spike for embedding Caddy as a Go library, driven entirely through its in-process admin API. |
|
Package network is ADR 006's WireGuard mesh: the abstraction that ADR 006 says "has to be designed in Phase 1 as an interface, not a concrete WireGuard dependency" and that, until TASKS.md 3.4, did not exist at all (the directory the project's repo layout reserves for it was empty).
|
Package network is ADR 006's WireGuard mesh: the abstraction that ADR 006 says "has to be designed in Phase 1 as an interface, not a concrete WireGuard dependency" and that, until TASKS.md 3.4, did not exist at all (the directory the project's repo layout reserves for it was empty). |
|
Package probe implements HTTP readiness checking: the controller calls out to a container over HTTP, rather than the container self-reporting health via Docker's own HEALTHCHECK state machine.
|
Package probe implements HTTP readiness checking: the controller calls out to a container over HTTP, rather than the container self-reporting health via Docker's own HEALTHCHECK state machine. |
|
Package prompb implements the small subset of Prometheus's remote-read wire protocol TASKS.md 2.6 needs (ReadRequest/ReadResponse and their nested messages), by hand, using google.golang.org/protobuf's low-level protowire primitives (already a transitive dependency, no new module).
|
Package prompb implements the small subset of Prometheus's remote-read wire protocol TASKS.md 2.6 needs (ReadRequest/ReadResponse and their nested messages), by hand, using google.golang.org/protobuf's low-level protowire primitives (already a transitive dependency, no new module). |
|
Package reconcile implements the core convergence loop: desired state in, observed state diffed against it, idempotent and level-triggered controllers converge the two.
|
Package reconcile implements the core convergence loop: desired state in, observed state diffed against it, idempotent and level-triggered controllers converge the two. |
|
application
Package application implements the declarative app spec's service contract and TASKS.md 1.3's application controller: the reconcile.Controller that converges a real, store-backed desired service to a running container, replacing nginxdemo's hardcoded desired state with the real thing.
|
Package application implements the declarative app spec's service contract and TASKS.md 1.3's application controller: the reconcile.Controller that converges a real, store-backed desired service to a running container, replacing nginxdemo's hardcoded desired state with the real thing. |
|
cloudflaretunnel
Package cloudflaretunnel implements the reconcile.Controller that converges a single, platform-wide desired state (store.
|
Package cloudflaretunnel implements the reconcile.Controller that converges a single, platform-wide desired state (store. |
|
database
Package database implements TASKS.md 1.8's managed database controller: the reconcile.Controller that converges a store-backed store.DesiredDatabase to a running, volume-backed container, the same architectural pattern internal/reconcile/application already establishes (level-triggered, deterministic naming, a narrow store interface for testability), applied to a database instead of a built application image.
|
Package database implements TASKS.md 1.8's managed database controller: the reconcile.Controller that converges a store-backed store.DesiredDatabase to a running, volume-backed container, the same architectural pattern internal/reconcile/application already establishes (level-triggered, deterministic naming, a narrow store interface for testability), applied to a database instead of a built application image. |
|
ingress
Package ingress implements TASKS.md 1.6's ingress controller: the reconcile.Controller that keeps Caddy's config (internal/ingress, ADR 005) in sync with every service that declares domains.
|
Package ingress implements TASKS.md 1.6's ingress controller: the reconcile.Controller that keeps Caddy's config (internal/ingress, ADR 005) in sync with every service that declares domains. |
|
mesh
Package mesh implements TASKS.md 3.4's mesh controller: the reconcile.Controller that keeps the WireGuard mesh and the internal DNS zone converged on whatever the store currently says the fleet and its placements look like.
|
Package mesh implements TASKS.md 3.4's mesh controller: the reconcile.Controller that keeps the WireGuard mesh and the internal DNS zone converged on whatever the store currently says the fleet and its placements look like. |
|
nginxdemo
Package nginxdemo is the Phase 0 exit criterion: one controller that keeps a single hardcoded nginx container running.
|
Package nginxdemo is the Phase 0 exit criterion: one controller that keeps a single hardcoded nginx container running. |
|
nodehealth
Package nodehealth implements TASKS.md 3.7's node health check: the reconcile.Controller that converges a node's observed heartbeat (internal/store's last_seen_at, kept fresh by internal/agent.Server's periodic touch loop while a node's gRPC session stays open) against its recorded Status, the same architectural pattern internal/reconcile/application and internal/reconcile/database already establish (level-triggered, a narrow store interface for testability, one controller instance per resource), applied to a node instead of a service or database.
|
Package nodehealth implements TASKS.md 3.7's node health check: the reconcile.Controller that converges a node's observed heartbeat (internal/store's last_seen_at, kept fresh by internal/agent.Server's periodic touch loop while a node's gRPC session stays open) against its recorded Status, the same architectural pattern internal/reconcile/application and internal/reconcile/database already establish (level-triggered, a narrow store interface for testability, one controller instance per resource), applied to a node instead of a service or database. |
|
registry
Package registry implements the reconcile.Controller that converges a single, platform-wide desired state (store.RegistrySettings plus a generated password in internal/secrets) to a running or absent registry:2 container: Levelrail's own built-in image registry, so a multi-node deployment gets a BuildKit cache/distribution backend (internal/build's WithCacheRegistry) without an operator first signing up for an external one.
|
Package registry implements the reconcile.Controller that converges a single, platform-wide desired state (store.RegistrySettings plus a generated password in internal/secrets) to a running or absent registry:2 container: Levelrail's own built-in image registry, so a multi-node deployment gets a BuildKit cache/distribution backend (internal/build's WithCacheRegistry) without an operator first signing up for an external one. |
|
Package rightsizing is a deterministic, pure-Go engine that turns an app's historical CPU/memory usage into a resource-limit suggestion.
|
Package rightsizing is a deterministic, pure-Go engine that turns an app's historical CPU/memory usage into a resource-limit suggestion. |
|
Package scheduledtask execs an operator-defined command into a running app's container on a cron schedule (e.g.
|
Package scheduledtask execs an operator-defined command into a running app's container on a cron schedule (e.g. |
|
Package secrets implements envelope encryption: per-app data encryption keys, wrapped by a master key held only by the control plane, using filippo.io/age for the crypto primitives.
|
Package secrets implements envelope encryption: per-app data encryption keys, wrapped by a master key held only by the control plane, using filippo.io/age for the crypto primitives. |
|
Package spec parses and validates the app.yaml file: the one declarative file a user writes in their repo, per the app spec design.
|
Package spec parses and validates the app.yaml file: the one declarative file a user writes in their repo, per the app spec design. |
|
Package store is the embedded SQLite state layer: WAL mode, modernc.org/sqlite (pure Go, no cgo, keeps cross-compiling the control plane binary trivial), forward-only versioned migrations.
|
Package store is the embedded SQLite state layer: WAL mode, modernc.org/sqlite (pure Go, no cgo, keeps cross-compiling the control plane binary trivial), forward-only versioned migrations. |
|
Package telemetry is the node-local metrics store, decided in ADR 009: a dedicated SQLite database (telemetry.db, separate from internal/store's levelrail.db) holding container resource-usage samples, queried in place rather than shipped anywhere centrally.
|
Package telemetry is the node-local metrics store, decided in ADR 009: a dedicated SQLite database (telemetry.db, separate from internal/store's levelrail.db) holding container resource-usage samples, queried in place rather than shipped anywhere centrally. |
|
Package totp implements time-based one-time passwords (RFC 6238, the algorithm every mainstream authenticator app speaks) plus the small amount of supporting logic 2FA needs: secret generation, an otpauth:// provisioning URI, and single-use recovery codes.
|
Package totp implements time-based one-time passwords (RFC 6238, the algorithm every mainstream authenticator app speaks) plus the small amount of supporting logic 2FA needs: secret generation, an otpauth:// provisioning URI, and single-use recovery codes. |
|
Package version holds the control plane's own build version, injected via -ldflags at release build time (see .github/workflows/release.yml).
|
Package version holds the control plane's own build version, injected via -ldflags at release build time (see .github/workflows/release.yml). |
|
Package webhook is TASKS.md 1.5's git integration: a GitHub push-webhook receiver that verifies the request signature, extracts the pushed commit SHA, fetches the repository at that SHA to a local checkout, and hands the result to internal/deploy's Pipeline (TASKS.md 1.4), the same pipeline a manual deploy trigger will use once the HTTP API (1.9) exists.
|
Package webhook is TASKS.md 1.5's git integration: a GitHub push-webhook receiver that verifies the request signature, extracts the pushed commit SHA, fetches the repository at that SHA to a local checkout, and hands the result to internal/deploy's Pipeline (TASKS.md 1.4), the same pipeline a manual deploy trigger will use once the HTTP API (1.9) exists. |
Click to show internal directories.
Click to hide internal directories.