Ports #
A sink: it has no outputs.
| Port | Direction | Kind | Required | Description |
|---|---|---|---|---|
in | input | records | yes |
Parameters #
This pipe has no parameters.
When to use it #
- A pipe has a required output that this pipeline has no use for: consume it explicitly so that nothing is lost by accident.
- Make the dead end visible as a node of its own in a pipeline diagram.
When to use something else
- It is equivalent to marking that output with
discard: true; use whichever reads more clearly.
A tested example #
Nothing here is invented: this is the test “consumes everything” from the pipe's own portable test file, which every conformant runner must pass.
This test sets no parameters.
1
{"a":2}
"three"Expected result: the run completes.
The same step as a node of a pipeline.yaml:
nodes:
discard:
pipe: std:discard
inputs:
in: {from: inputs.in}Notes from the manifest #
The pipe's manifest, OPENFLANGE.md, carries these notes.
Part of the OpenFlange standard library (std, version 0.1).
A sink that reads its input to the end and drops every item, like
/dev/null. Items are not decoded. To drop a single required output of a
node, the consumer-side control outputs: {<port>: {discard: true}} is
simpler; std:discard is for an explicit sink node in the graph.
Reference #
- Maturity
- Experimental
- Manifest version
0.1.0
- Normative definition: std:discard in the standard library specification
- Manifest and tests: std/0.1/discard in the specification repository