This Documentation is a WIP
Simple composite component that echos input back as output
Every component starts off with the common Component
kind and an optional name.
kind: wick/component@v1 name: echo
This example defines 1 operation:
. There is no real logic in
composite operations. They define the flow of data from the input, to other operations, and finally to the output.
outputs are frequently omitted in composite operations. Their types are inferred from the inputs and outputs they connect to.
operations: - flow: - <input>.input -> <output>.output inputs: - name: input type: string name: echo outputs: - name: output type: string
The full configuration is located at examples/components/echo.wick.
Running on the CLI with
Run this component on the command line by cloning the wick repository and using
cargo run -p wick-cli -- invoke to run
wick from source.
Clone the repository with
git clone https://github.com/candlecorp/wick && cd wick
Notice: the arguments to the operation come after the
Invoke the operation
echo with the following command:
wick invoke examples/components/echo.wick echo -- --input=[...]
The full example configuration is included below,
kind: wick/component@v1 name: echo metadata: version: 0.0.1 description: Simple composite component that echos input back as output licenses: - Apache-2.0 component: kind: wick/component/composite@v1 operations: - name: echo inputs: - name: input type: string outputs: - name: output type: string flow: - <input>.input -> <output>.output tests: - name: basic cases: - name: default operation: echo inputs: - name: input value: 'Hello, world!' outputs: - name: output value: 'Hello, world!'