Documentation
ΒΆ
Overview ΒΆ
Package leoflow embeds the Python parser and runtime package sources so a binary-only install (no source checkout) can provision them. The dev source trees under parser/ and runtime/python/ remain the canonical copies; this embed reads them directly at build time, so there is no duplicated source.
The all: prefix is required on the package directories: Python packages contain __init__.py, and go:embed's default rules drop names beginning with "_" or ".". The patterns are scoped to the package dir plus pyproject.toml / README.md (what pip needs) so the dev-only test fixtures and dot-caches (.pytest_cache, .ruff_cache, .coverage) are not embedded. Build from a clean tree (no __pycache__) so stale bytecode is not embedded.
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
func DevCompose ΒΆ
func DevCompose() []byte
DevCompose returns the embedded docker-compose for Leoflow Lite's local Postgres + Redis, so a binary-only install (no source checkout) can bring the datastores up with `leoflow lite` alone β it is materialized under ~/.leoflow on first run.
func ExampleDAGs ΒΆ
ExampleDAGs returns the embedded DAG examples (one subdirectory per DAG, each with dag.py + leoflow.yaml). The Lite IDE's "Download examples" button materializes them into the user's workspace under examples/, so a fresh install can try every operator without a separate git checkout. Root is "examples/" β the same layout as the source tree.
func PythonSources ΒΆ
PythonSources returns the embedded parser and runtime package sources, rooted so that "parser/..." and "runtime/python/..." resolve.
Types ΒΆ
This section is empty.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
leoflow
command
Command leoflow is the developer CLI for authoring and compiling DAGs.
|
Command leoflow is the developer CLI for authoring and compiling DAGs. |
|
leoflow-agent
command
Command leoflow-agent runs as PID 1 inside every task pod.
|
Command leoflow-agent runs as PID 1 inside every task pod. |
|
leoflow-server
command
Command leoflow-server runs the Leoflow control plane: the HTTP API, auth, metrics, and (when enabled) the scheduler.
|
Command leoflow-server runs the Leoflow control plane: the HTTP API, auth, metrics, and (when enabled) the scheduler. |
|
internal
|
|
|
agent
Package agent contains the worker-side logic that runs inside the task container: building the user process command, injecting XCom inputs, reading the return value, and retry backoff.
|
Package agent contains the worker-side logic that runs inside the task container: building the user process command, injecting XCom inputs, reading the return value, and retry backoff. |
|
agentrpc
Package agentrpc implements the control-plane side of the agent gRPC protocol: it authenticates each in-pod agent by its per-task-instance token, serves the task specification, and records the state transitions the agent reports.
|
Package agentrpc implements the control-plane side of the agent gRPC protocol: it authenticates each in-pod agent by its per-task-instance token, serves the task specification, and records the state transitions the agent reports. |
|
api
Package api implements the Airflow-compatible HTTP control plane (ADR 0007).
|
Package api implements the Airflow-compatible HTTP control plane (ADR 0007). |
|
auth
Package auth provides JWT authentication, password hashing, the RBAC permission model, and login rate limiting for the control plane (ADR 0008).
|
Package auth provides JWT authentication, password hashing, the RBAC permission model, and login rate limiting for the control plane (ADR 0008). |
|
cli
Package cli implements the leoflow command-line interface.
|
Package cli implements the leoflow command-line interface. |
|
config
Package config loads Leoflow configuration from defaults, an optional config file, and LEOFLOW_* environment variables, with flags taking precedence.
|
Package config loads Leoflow configuration from defaults, an optional config file, and LEOFLOW_* environment variables, with flags taking precedence. |
|
dispatch
Package dispatch launches pod-path task instances: it resolves a task's execution context, mints the agent's identity token, and routes the request to the executor.
|
Package dispatch launches pod-path task instances: it resolves a task's execution context, mints the agent's identity token, and routes the request to the executor. |
|
domain
Package domain defines the core Leoflow types (DAG, Task, project config) and validates them against the canonical JSON Schemas in docs/api.
|
Package domain defines the core Leoflow types (DAG, Task, project config) and validates them against the canonical JSON Schemas in docs/api. |
|
executor
Package executor runs task instances via Kubernetes, Docker, a subprocess, or inline HTTP, selected by the Router (ADR 0002).
|
Package executor runs task instances via Kubernetes, Docker, a subprocess, or inline HTTP, selected by the Router (ADR 0002). |
|
logs
Package logs ships task logs from the agent to durable storage and serves them back via the API, so logs remain available after the task pod is gone.
|
Package logs ships task logs from the agent to durable storage and serves them back via the API, so logs remain available after the task pod is gone. |
|
observability
Package observability wires structured logging, Prometheus metrics, and OpenTelemetry tracing for the Leoflow control plane (ADR 0010).
|
Package observability wires structured logging, Prometheus metrics, and OpenTelemetry tracing for the Leoflow control plane (ADR 0010). |
|
scheduler
Package scheduler implements the Leoflow scheduling state machine and loop.
|
Package scheduler implements the Leoflow scheduling state machine and loop. |
|
secrets
Package secrets encrypts sensitive values (e.g.
|
Package secrets encrypts sensitive values (e.g. |
|
setup
Package setup implements host detection and bootstrap for `leoflow setup` and `leoflow doctor`: it determines the platform, which dependencies are present, and which operating tier is achievable, preferring relocatable downloads into ~/.leoflow over system package managers.
|
Package setup implements host detection and bootstrap for `leoflow setup` and `leoflow doctor`: it determines the platform, which dependencies are present, and which operating tier is achievable, preferring relocatable downloads into ~/.leoflow over system package managers. |
|
storage
Package storage wraps the Postgres and Redis connections used by the control plane, exposing the sqlc-generated query set and health checks.
|
Package storage wraps the Postgres and Redis connections used by the control plane, exposing the sqlc-generated query set and health checks. |
|
ui
Package ui embeds and serves the pinned Apache Airflow 3.2.1 React SPA bundle.
|
Package ui embeds and serves the pinned Apache Airflow 3.2.1 React SPA bundle. |
|
version
Package version exposes build metadata embedded into the binary at link time.
|
Package version exposes build metadata embedded into the binary at link time. |
|
workspace
Package workspace provides a filesystem confined to a single root directory.
|
Package workspace provides a filesystem confined to a single root directory. |
|
xcom
Package xcom implements the Leoflow XCom subsystem: small typed payloads passed between tasks, stored in Redis with a hard size limit and a TTL, with metadata indexed in Postgres for retrieval (ADR 0006).
|
Package xcom implements the Leoflow XCom subsystem: small typed payloads passed between tasks, stored in Redis with a hard size limit and a TTL, with metadata indexed in Postgres for retrieval (ADR 0006). |
|
Package migrations embeds the SQL migration files so the control plane can apply them without the source tree present β a step toward a binaries-only `leoflow dev` (no checked-out repo required).
|
Package migrations embeds the SQL migration files so the control plane can apply them without the source tree present β a step toward a binaries-only `leoflow dev` (no checked-out repo required). |
|
proto
|
|