Documentation
¶
Overview ¶
Package pipeline provides the `@pipeline NAME ... @end` directive. The block is stored in meta["pipelines"] and compiled into a sub-action mounted on the resolver by the Materialize step, so later pipelines can reference it by name.
Typical use:
@pipeline safe_fetch
fetch -> validate
@end
{ url: "https://x" } -> safe_fetch
Index ¶
Constants ¶
const ID = "pipeline"
Variables ¶
var Directive = core.Directive{
Name: "pipeline",
Example: "@pipeline pack:route=\"POST /pack\"\n src -> dst\n@end",
Handler: handleDirective,
}
Directive parses `@pipeline NAME ... @end` and stores the block body in meta["pipelines"][NAME]. Inline modifiers after the name — `:key` or `:key=value`, with optional single/double-quoted values — are collected into meta["pipeline_modifiers"][NAME] and applied to the compiled sub-pipeline during materialization.
Each declared pipeline is mounted on the resolver as `pipeline.<name>` (the prefix is added only when the name has no dot), so a pipeline may reference another by its canonical name.
`@pipeline name` with no modifiers is valid and behaves exactly as it did before modifiers were supported.
Functions ¶
Types ¶
type AppliedModifier ¶ added in v0.14.0
type AppliedModifier struct {
Raw string
Source core.ModifierSource
}
AppliedModifier is a modifier together with the origin that produced it. Pipeline directive handlers build these so `nflow explain` can attribute every effective modifier to a pipeline or profile.