【问题标题】:How use Wire with Flow in client gRPC?如何在客户端 gRPC 中使用 Wire 和 Flow?
【发布时间】:2021-02-09 12:38:09
【问题描述】:

我需要使用 Wire 的服务 gRPC 流,并且需要在客户端使用 Flow,但 executeBlocking() 不提供通过 Flow 的返回方法,需要通过 flow 发出的实现手册?

【问题讨论】:

    标签: kotlin kotlin-coroutines square-wire grpc-kotlin


    【解决方案1】:

    我想你想使用execute,而不是executeBlocking(),并想办法将Channels 转换为Flows?或者只是从blockingGet值开始一个新的Flow?

    flow {
      emit(value)
    }
    

    【讨论】:

      猜你喜欢
      • 2020-07-22
      • 2018-05-17
      • 1970-01-01
      • 1970-01-01
      • 2020-07-01
      • 2019-09-01
      • 2020-04-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多