Documentation
¶
Overview ¶
Package export defines the interface every exporter in this module implements; each format is a subpackage. Hold an Exporter to pick a format at run time, or to write your own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNilCycle = errors.New("export: cycle is nil")
ErrNilCycle is returned by ExportCycle when the cycle is nil.
View Source
var ErrNilMesh = errors.New("export: mesh is nil")
ErrNilMesh is returned by Export and ExportCycle when the mesh is nil.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter interface {
// Export renders the mesh structure: components, ports and pipes. A nil
// mesh is ErrNilMesh.
Export(fm *fmesh.FMesh) ([]byte, error)
// ExportCycle renders the structure together with the results of one
// cycle of a run, e.g. one from RuntimeInfo.Cycles or from an AfterCycle
// hook. A component with no result in the cycle had no input. A nil mesh
// is ErrNilMesh, and a nil cycle is ErrNilCycle.
ExportCycle(fm *fmesh.FMesh, c *cycle.Cycle) ([]byte, error)
}
Exporter renders a mesh in one format. An exporter only reads the mesh, and its output is deterministic: equal meshes export byte-identical documents.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package d2 provides Exporter, which exports an fmesh mesh as D2 diagram source: the structure, or the structure in the state of one cycle with components colored by their activation result.
|
Package d2 provides Exporter, which exports an fmesh mesh as D2 diagram source: the structure, or the structure in the state of one cycle with components colored by their activation result. |
|
Package dot provides Exporter, which exports an fmesh mesh as a Graphviz DOT graph: the structure, or the structure in the state of one cycle.
|
Package dot provides Exporter, which exports an fmesh mesh as a Graphviz DOT graph: the structure, or the structure in the state of one cycle. |
|
internal
|
|
|
cmd/showcase
command
Command showcase builds and runs an order-processing mesh, then writes its graphs in one export format to a directory: static.<ext> and one cycle-NNN.<ext> per cycle.
|
Command showcase builds and runs an order-processing mesh, then writes its graphs in one export format to a directory: static.<ext> and one cycle-NNN.<ext> per cycle. |
|
doc
Package doc builds the documents that data-format exporters encode: the mesh structure, and the structure with one cycle's results.
|
Package doc builds the documents that data-format exporters encode: the mesh structure, and the structure with one cycle's results. |
|
Package json exports a mesh as indented JSON: its structure, or its state in one cycle.
|
Package json exports a mesh as indented JSON: its structure, or its state in one cycle. |
|
Package mermaid provides Exporter, which exports an fmesh mesh as a Mermaid flowchart: the structure, or the structure in the state of one cycle with components colored by their activation result.
|
Package mermaid provides Exporter, which exports an fmesh mesh as a Mermaid flowchart: the structure, or the structure in the state of one cycle with components colored by their activation result. |
|
Package plantuml provides Exporter, which exports an fmesh mesh as a PlantUML component diagram: the structure, or the structure in the state of one cycle with components colored by their activation result.
|
Package plantuml provides Exporter, which exports an fmesh mesh as a PlantUML component diagram: the structure, or the structure in the state of one cycle with components colored by their activation result. |
|
Package yaml exports a mesh as YAML: its structure, or its state in one cycle.
|
Package yaml exports a mesh as YAML: its structure, or its state in one cycle. |
Click to show internal directories.
Click to hide internal directories.







