Files
wehub-resource-sync d88fd01084
CI / test (3.10) (push) Failing after 1s
CI / test (3.12) (push) Failing after 0s
CI / skillgen-check (push) Failing after 0s
CI / security-scan (push) Failing after 0s
chore: import upstream snapshot with attribution
2026-07-13 12:09:14 +08:00

50 lines
1018 B
Kotlin

import kotlinx.coroutines.delay
import kotlin.math.max
data class Config(val baseUrl: String, val timeout: Int)
class HttpClient(private val config: Config) {
fun get(path: String): String {
return buildRequest("GET", path)
}
fun post(path: String, body: String): String {
return buildRequest("POST", path)
}
private fun buildRequest(method: String, path: String): String {
return "$method ${config.baseUrl}$path"
}
}
interface Loggable {
fun log()
}
open class BaseProcessor
class Result<T>
class DataProcessor : BaseProcessor(), Loggable {
var current: Result<DataProcessor> = Result()
fun run(input: DataProcessor): Result<DataProcessor> {
return current
}
override fun log() {}
}
class LoggingList<T>(inner: MutableList<T>) : MutableList<T> by inner
fun createClient(baseUrl: String): HttpClient {
val config = Config(baseUrl, 30)
return HttpClient(config)
}
enum class ChatType {
NORMAL,
GROUP,
SYSTEM
}