16 lines
418 B
Kotlin
16 lines
418 B
Kotlin
package com.rainy.token.data.proxy
|
|
|
|
import java.io.InputStream
|
|
|
|
/**
|
|
* 上游流式响应句柄:由本地网关在收到客户端 stream=true 请求时创建,
|
|
* 把上游 SSE/原始字节流实时转发给本地客户端。
|
|
* 使用方必须在 finally 中调用 [close]。
|
|
*/
|
|
class ProxyUpstreamStream(
|
|
val status: Int,
|
|
val contentType: String,
|
|
val input: InputStream,
|
|
val close: () -> Unit,
|
|
)
|