Expand description
engine orchestration: load, validate, plan, apply.
Re-exports§
pub use external::run_external_adapter;pub use external::ExternalAdapter;pub use external::ExternalEnvelope;pub use external::ExternalObject;pub use external::ExternalRequest;pub use external::ExternalResponse;pub use external::EXTERNAL_PROTOCOL_VERSION;
Modules§
- external
- helpers for implementing external adapters.
- journal
- Keep track of successfully applied ops to enable resume after an error.
- mapping
- shared mapping helpers used by multiple adapters.
Macros§
- alembic_
external_ main - convenience macro to define an external adapter main.
Structs§
- Applied
Op - result for a single applied operation.
- Apply
Report - aggregated apply report.
- Changed
Entry - an object present in both intent and backend, but with diverging fields.
- Drift
Entry - an object that exists on only one side of the diff (missing or extra).
- Drift
Report - read-only report of how observed backend state diverges from declared intent.
- Field
Change - field-level change for an update op.
- Import
Report - MapSpec
- a map specification: the target schema plus the transformation rules.
- Observed
Object - observed backend object representation.
- Observed
State - observed backend state indexed by id and key.
- Plan
- full plan document.
- Plan
Summary - high-level summary of plan operations.
- Provision
Report - report from ensure_schema provisioning.
- Retry
Apply Result - State
Data - on-disk state schema.
- State
Store - state store wrapper with load/save helpers.
- Transforms
Spec - the
transforms:block of a map spec: starlark source from a file or inline. exactly one of the two must be set.
Enums§
- Adapter
Apply Error - Backend
- a constructed backend, tagged with its capability.
- Backend
Id - generic backend identifier (integer or string/uuid).
- Op
- plan operation.
- Postgres
TlsMode - TLS configuration for postgres state backend connections.
Traits§
- Adapter
- full adapter contract for read+write backends; may also provision schema.
- Emitter
- write capability: apply a plan’s operations.
- Observer
- read capability: observe backend state.
- Retry
Apply Driver
Functions§
- apply_
non_ delete_ with_ retries - apply_
plan - apply a plan and update the state store. full adapters provision schema before writing; emitters only write.
- build_
key_ from_ schema - build_
plan - observe backend state and produce a deterministic plan.
- build_
request_ body - compile_
map - transform an ir inventory into another ir inventory under the target schema.
- eval_
map_ transform - evaluate a single named transform from a map spec against a json value,
consulting the spec’s user transforms first, then the built-ins. backs
alembic map transform, the iteration loop for writing transforms: one value in, the typed result out, no inventory or backend involved. - import_
inventory - load_
inventory - load a inventory file (yaml or json) and merge any includes.
- load_
map_ spec - load a map spec from a yaml file. the spec remembers the file’s directory so
transforms.fileand starlarkload()paths resolve relative to it. - plan
- build a deterministic plan from desired and observed state.
- query_
filters_ from_ key - report_
to_ result - helper to format a validation report into a Result.
- report_
to_ result_ with_ sources - helper to format a validation report with source locations into a Result.
- resolve_
value_ for_ type - sort_
ops_ for_ apply - order operations for apply: creates/updates first (topologically sorted so referenced objects are created before the objects that reference them), then deletes (reverse-toposorted so an object is deleted only after everything referencing it). reference cycles fall back to a stable order.
- validate
- validate an inventory and return the report.