Client Calls
object ClientCalls
Content copied to clipboard
Helpers for gRPC clients implemented in Kotlin. Can be used directly, but intended to be used from generated Kotlin APIs.
Functions
bidiStreamingRpc
Link copied to clipboard
fun <RequestT, ResponseT> bidiStreamingRpc(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, requests: Flow<RequestT>, callOptions: CallOptions = CallOptions.DEFAULT, headers: Metadata = GrpcMetadata()): Flow<ResponseT>
Content copied to clipboard
Returns a Flow which launches the specified bidirectional-streaming RPC, collecting the requests flow, sending them to the server, and emitting the responses.
bidiStreamingRpcFunction
Link copied to clipboard
fun <RequestT, ResponseT> bidiStreamingRpcFunction(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, callOptions: CallOptions = CallOptions.DEFAULT, headers: suspend () -> Metadata = { GrpcMetadata() }): (Flow<RequestT>) -> Flow<ResponseT>
Content copied to clipboard
clientStreamingRpc
Link copied to clipboard
suspend fun <RequestT, ResponseT> clientStreamingRpc(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, requests: Flow<RequestT>, callOptions: CallOptions = CallOptions.DEFAULT, headers: Metadata = GrpcMetadata()): ResponseT
Content copied to clipboard
clientStreamingRpcFunction
Link copied to clipboard
fun <RequestT, ResponseT> clientStreamingRpcFunction(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, callOptions: CallOptions = CallOptions.DEFAULT, headers: suspend () -> Metadata = { GrpcMetadata() }): suspend (Flow<RequestT>) -> ResponseT
Content copied to clipboard
serverStreamingRpc
Link copied to clipboard
fun <RequestT, ResponseT> serverStreamingRpc(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, request: RequestT, callOptions: CallOptions = CallOptions.DEFAULT, headers: Metadata = GrpcMetadata()): Flow<ResponseT>
Content copied to clipboard
Returns a Flow which launches the specified server-streaming RPC and emits the responses.
serverStreamingRpcFunction
Link copied to clipboard
fun <RequestT, ResponseT> serverStreamingRpcFunction(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, callOptions: CallOptions = CallOptions.DEFAULT, headers: suspend () -> Metadata = { GrpcMetadata() }): (RequestT) -> Flow<ResponseT>
Content copied to clipboard
unaryRpc
Link copied to clipboard
unaryRpcFunction
Link copied to clipboard
fun <RequestT, ResponseT> unaryRpcFunction(channel: Channel, method: MethodDescriptor<RequestT, ResponseT>, callOptions: CallOptions = CallOptions.DEFAULT, headers: suspend () -> Metadata = { GrpcMetadata() }): suspend (RequestT) -> ResponseT
Content copied to clipboard
Sources
jvm source
Link copied to clipboard