You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/node/nodes/gateway.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,14 @@ hide_table_of_contents: true
5
5
6
6
# Gateway
7
7
8
-
The `gateway` node-type enable VILLASnode to transform api type.
8
+
The `gateway` node-type enables VILLASnode to transform Application Programmable Interfaces (API) types.
9
9
Currently, the transformation of [http](https://en.wikipedia.org/wiki/HTTP) and [gRPC](https://grpc.io/) is supported.
10
10
11
11
12
12
### Limitations
13
13
14
14
- For protobuf payload that is not [VILLASnode format](../formats/protobuf.md), only simple datatypes are supported.
15
-
- It only supported unary RPC.
15
+
- It only supportes unary RPC.
16
16
17
17
18
18
## Prerequisites
@@ -55,17 +55,20 @@ nodes = {
55
55
## Usage
56
56
57
57
The usage of this node is similar to [`api`](api.md) node-type.
58
-
The following [`curl`](https://curl.se/) commands are example for calling gRPC method with HTTP api.
59
-
The input of gRPC method can be either by the body of http request or input data from other node(via a [path](../config/paths.md)).
58
+
The following [`curl`](https://curl.se/) commands are examples for calling gRPC methods with http API.
59
+
The input for a gRPC call can be either the body of http request or input data from another node(via a [path](../config/paths.md)).
60
60
If the http request body is empty, the input from other node will be used.
61
61
62
+
Since this node-type does not implement the gRPC server, it needs to be added manually. A description is available [here](https://www.acs.eonerc.rwth-aachen.de/global/show_document.asp?id=aaaaaaaadidaesd).
63
+
62
64
Note on http methods
63
65
- GET should be used only when the input of gRPC method can be empty or ignored.
64
66
- PUT should be used when the output of gRPC method is in VILLASnode format and the user want to put the data to the path.
65
67
- POST should be used when the output of gRPC method is not in VILLASnode format or the user not want output data to the path.
66
68
67
69
68
-
#### The url for sending a request to this node-type are as following
70
+
### General Request
71
+
The url for sending a request to the gateway node-type is as following:
69
72
```
70
73
http://<address>:<port>/api/v2/gateway/<node name or UUID>/<gRPC package>/<gRPC service>/<gRPC method>
0 commit comments