Output Formats
The composer generates various output formats to visualize or inspect the topology.
tc compose -f <format>The following are some available formats
- json
- table
- tree
- digraph
- ascii graph
- icepanel
Let’s try various formats in examples/patterns/rest-async-progress
tc compose -f tree
example-rest-progress├╌╌ functions┆ ├╌╌ f3┆ ┆ ├╌╌ f3┆ ┆ ├╌╌ fqn: example-rest-progress_f3_{{sandbox}}┆ ┆ ├╌╌ role: tc-base-function-{{sandbox}}┆ ┆ ├╌╌ uri: examples/patterns/rest-async-progress/f3/lambda.zip┆ ┆ └╌╌ build: code┆ ├╌╌ f2┆ ┆ ├╌╌ f2┆ ┆ ├╌╌ fqn: example-rest-progress_f2_{{sandbox}}┆ ┆ ├╌╌ role: tc-base-function-{{sandbox}}┆ ┆ ├╌╌ uri: examples/patterns/rest-async-progress/f2/lambda.zip┆ ┆ └╌╌ build: code┆ └╌╌ f1┆ ├╌╌ f1┆ ├╌╌ fqn: example-rest-progress_f1_{{sandbox}}┆ ├╌╌ role: tc-base-function-{{sandbox}}┆ ├╌╌ uri: examples/patterns/rest-async-progress/f1/lambda.zip┆ └╌╌ build: code├╌╌ events┆ └╌╌ ProcessStart└╌╌ routes └╌╌ /api/messagetc compose -f table entity | name | target_entity | target_name----------+------+---------------+------------- function | f1 | function | f2 function | f1 | channel | c1 function | f3 | channel | c1 function | f2 | function | f3 function | f2 | channel | c1Digraph
Section titled “Digraph”We can visualize the topology as digraph and render it using graphviz/dot.
tc compose -f dot |dot -Tpng > ~/dot.png
# or via stdin
tc compose -f dot |dot -Tpng | feh -
ASCII graph
Section titled “ASCII graph”tc compose -f asciiIcepanel
Section titled “Icepanel”tc compose -f icepanel{ "modelObjects": [ { "id": "example-rest-progress", "name": "example-rest-progress", "tagIds": [ "tag-external" ], "type": "domain" }, { "id": "example-rest-progress_f1", "name": "f1", "parentId": "example-rest-progress", "tagIds": [ "tag-external" ], "type": "app" }, { "id": "example-rest-progress_f2", "name": "f2", "parentId": "example-rest-progress", "tagIds": [ "tag-external" ], "type": "app" }, { "id": "example-rest-progress_f3", "name": "f3", "parentId": "example-rest-progress", "tagIds": [ "tag-external" ], "type": "app" } ]}