UNPKG

4.2 kBYAMLView Raw
1title: Component protocol
2description: Protocol for handling the component registry.
3
4output:
5
6 error:
7 description: 'Component error'
8
9 component:
10 description: Transmit the metadata about a component instance.
11 properties:
12 name:
13 type: string
14 description: component name in format that can be used in graphs
15 description:
16 type: string
17 description: '(optional) textual description on what the component does'
18 icon:
19 type: string
20 description: '(optional): visual icon for the component, matching icon names in [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/)'
21 subgraph:
22 type: boolean
23 description: boolean telling whether the component is a subgraph
24 inPorts:
25 description: 'list of input ports, each containing:'
26 properties:
27 id:
28 type: string
29 description: port name
30 type:
31 type: string
32 description: port datatype, for example `boolean`
33 description:
34 type: string
35 description: textual description of the port
36 addressable:
37 type: boolean
38 description: boolean telling whether the port is an ArrayPort
39 required:
40 type: boolean
41 description: boolean telling whether the port needs to be connected for the component to work
42 values:
43 type: array
44 description: '(optional) array of the values that the port accepts for enum ports'
45 default:
46 type: any
47 description: '(optional) the default value received by the port'
48 outPorts:
49 description: list of output ports
50 properties:
51 id:
52 type: string
53 description: port name
54 type:
55 type: string
56 description: port datatype, for example `boolean`
57 description:
58 type: string
59 description: textual description of the port
60 addressable:
61 type: boolean
62 description: boolean telling whether the port is an ArrayPort
63 required:
64 type: boolean
65 description: boolean telling whether the port needs to be connected for the component to work
66
67 source:
68 description: Source code for a component. In cases where a runtime receives a `source` message, it should do whatever operations are needed for making that component available for graphs, including possible compilation.
69 properties:
70 name:
71 type: string
72 description: Name of the component
73 language:
74 type: string
75 description: The programming language used for the component code, for example `coffeescript`
76 library:
77 type: string
78 description: '(optional) Component library identifier'
79 code:
80 type: string
81 description: Component source code
82 tests:
83 type: string
84 description: '(optional) unit tests for the component'
85
86input:
87 error:
88 description: 'Component error'
89
90 list:
91 description: Request a list of currently available components. Will be responded with a set of `component` messages.
92
93
94 getsource:
95 description: Request for the source code of a given component. Will be responded with a `source` message.
96 properties:
97 name:
98 type: string
99 description: Name of the component to get source code for
100
101 source:
102 description: Source code for a component. In cases where a runtime receives a `source` message, it should do whatever operations are needed for making that component available for graphs, including possible compilation.
103 properties:
104 name:
105 type: string
106 description: Name of the component
107 language:
108 type: string
109 description: The programming language used for the component code, for example `coffeescript`
110 library:
111 type: string
112 description: '(optional) Component library identifier'
113 code:
114 type: string
115 description: Component source code
116 tests:
117 type: string
118 description: '(optional) unit tests for the component'