File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 35
35
<toc-element topic =" grpc-services.topic" />
36
36
<toc-element topic =" grpc-client.topic" />
37
37
<toc-element topic =" grpc-server.topic" />
38
+ <toc-element topic =" grpc-ktor-server.topic" />
38
39
</toc-element >
39
40
</toc-element >
40
41
<toc-element topic =" strict-mode.topic" />
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ - Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
4
+ -->
5
+
6
+ <!DOCTYPE topic
7
+ SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
8
+ <topic xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
+ xsi : noNamespaceSchemaLocation =" https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
10
+ title =" Ktor Server" id =" grpc-ktor-server" >
11
+
12
+ <p >
13
+ Similarly to <a href =" grpc-server.topic" />,
14
+ you can use gRPC with Ktor:
15
+ </p >
16
+ <code-block lang =" kotlin" >
17
+ fun Application.module() {
18
+ grpc(port = PORT, configure = { /* ... */ }) {
19
+ registerService< MyService> { MyServiceImpl() }
20
+ }
21
+ }
22
+ </code-block >
23
+ <p >
24
+ <code >GrpcServer</code > instance is created and bound to the Ktor Application lifetime.
25
+ It can be accessed via <code >application.attributes[GrpcServerKey]</code >.
26
+ </p >
27
+ </topic >
You can’t perform that action at this time.
0 commit comments