|
6 | 6 | title="Services" id="grpc-services"> |
7 | 7 |
|
8 | 8 | <p> |
9 | | - Define a service in the <code>proto</code> folder next to your source sets: |
| 9 | + To define a service, create a new <code>.proto</code> file in the <code>proto</code> folder next to your source sets: |
10 | 10 | </p> |
11 | 11 | <code-block> |
12 | 12 | ├── build.gradle.kts |
|
24 | 24 | </code-block> |
25 | 25 |
|
26 | 26 | <p> |
27 | | - Inside the file define a service: |
| 27 | + Inside the <code>.proto</code> file define your service: |
28 | 28 | </p> |
29 | 29 | <code-block lang="protobuf"> |
30 | 30 | syntax = "proto3"; |
|
42 | 42 | } |
43 | 43 | </code-block> |
44 | 44 | <p> |
45 | | - Some code will be generated. The most important ones are <code>interface ImageRecognizer</code>, |
46 | | - <code>interface Image</code> and <code>interface RecogniseResult</code>: |
| 45 | + This will generate the necessary code, including the most important interfaces: |
| 46 | + <code>ImageRecognizer</code>, <code>Image</code>, <code>RecogniseResult</code>: |
47 | 47 | </p> |
48 | 48 | <code-block lang="Kotlin"> |
49 | 49 | @Grpc |
|
79 | 79 | } |
80 | 80 | </code-block> |
81 | 81 | <p> |
82 | | - Here you can also see the usage of <code>interface RecogniseResult</code>. |
83 | | - To create an instance simple use its <code>invoke</code> extension function: |
| 82 | + Here you can also see the usage of the <code>RecogniseResult</code> interface. |
| 83 | + To create an instance, use its <code>.invoke()</code> extension function: |
84 | 84 | </p> |
85 | 85 | <code-block lang="Kotlin"> |
86 | 86 | RecogniseResult { |
87 | 87 | category = 0 |
88 | 88 | } |
89 | 89 | </code-block> |
90 | 90 |
|
91 | | - <warning> |
92 | | - Current known limitations: |
| 91 | + <chapter title="Limitations" id="limitations"> |
| 92 | + <p>Current known limitations:</p> |
93 | 93 | <list> |
94 | 94 | <li>No streaming</li> |
95 | 95 | <li>Only primitive types in messages</li> |
96 | 96 | <li>Mandatory java and kotlin protoc generation in addition to our codegen</li> |
97 | 97 | <li>Kotlin/JVM project only</li> |
98 | 98 | </list> |
99 | | - If you encounter other unexpected limitations or bugs, |
100 | | - please <a href="https://github.com/Kotlin/kotlinx-rpc/issues/new?template=bug_report.md">report</a> them |
101 | | - </warning> |
| 99 | + <p> |
| 100 | + If you encounter other unexpected limitations or bugs, |
| 101 | + please <a href="https://github.com/Kotlin/kotlinx-rpc/issues/new?template=bug_report.md">report</a> them |
| 102 | + </p> |
| 103 | + </chapter> |
102 | 104 | </topic> |
0 commit comments