Skip to content

Commit e554b06

Browse files
committed
grpc: Address PR comments
Signed-off-by: Johannes Zottele <[email protected]>
1 parent 6db166b commit e554b06

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

grpc/grpc-core/src/commonMain/kotlin/kotlinx/rpc/grpc/GrpcServer.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ public class GrpcServer internal constructor(
198198
}
199199
}
200200

201-
202201
/**
203202
* Creates and configures a gRPC server instance.
204203
*
@@ -212,8 +211,8 @@ public class GrpcServer internal constructor(
212211
* GrpcServer(port) {
213212
* credentials = tls(myCertChain, myPrivateKey)
214213
* services {
215-
* registerService(MyService())
216-
* registerService(MyOtherService())
214+
* registerService<MyService> { MyServiceImpl() }
215+
* registerService<MyOtherService> { MyOtherServiceImpl() }
217216
* }
218217
* }
219218
* ```
@@ -308,8 +307,8 @@ public class GrpcServerConfiguration internal constructor() {
308307
* ```kt
309308
* GrpcServer(port) {
310309
* services {
311-
* registerService(MyService())
312-
* registerService(MyOtherService())
310+
* registerService<MyService> { MyServiceImpl() }
311+
* registerService<MyOtherService> { MyOtherServiceImpl() }
313312
* }
314313
* }
315314
* ```

grpc/grpc-core/src/commonMain/kotlin/kotlinx/rpc/grpc/ServerInterceptor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public interface ServerCallScope<Request, Response> {
9393
* flow {
9494
* val authorized = mySuspendAuth(requestHeaders)
9595
* if (!authorized) {
96-
* close(Status(StatusCode.UNAUTHENTICATED, "Not authorized"))
96+
* close(Status(StatusCode.PERMISSION_DENIED, "Not authorized"))
9797
* }
9898
*
9999
* proceedUnmodified(request)

grpc/grpc-core/src/commonTest/kotlin/kotlinx/rpc/grpc/test/RawClientTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class RawClientTest {
6262
) { client, descriptor ->
6363
val response = client.clientStreamingRpc(descriptor, flow {
6464
repeat(5) {
65-
delay(100)
6665
println("Sending: ${it + 1}")
6766
emit(EchoRequest { message = "Eccchhooo" })
6867
}

0 commit comments

Comments
 (0)