From 313fb78c78f22727d52bfba1fdeeaa26f02efa86 Mon Sep 17 00:00:00 2001 From: "a.usenko" Date: Tue, 15 Oct 2024 17:55:15 +0300 Subject: [PATCH 1/3] Add lambda --- .../evo/elasticmagic/transport/ElasticsearchKtorTransport.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt b/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt index ca9012170a..eb1fb62eed 100644 --- a/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt +++ b/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt @@ -1,6 +1,7 @@ package dev.evo.elasticmagic.transport import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.auth.Auth import io.ktor.client.plugins.auth.providers.basic @@ -21,6 +22,7 @@ import io.ktor.http.takeFrom class ElasticsearchKtorTransport( baseUrl: String, engine: HttpClientEngine, + val customHttpClientConfig: HttpClientConfig<*>.() -> Unit = {}, configure: Config.() -> Unit = {}, ) : ElasticsearchTransport( baseUrl, @@ -29,6 +31,8 @@ class ElasticsearchKtorTransport( private val client = HttpClient(engine) { expectSuccess = false + customHttpClientConfig(this) + // Enable compressed response from Elasticsearch if (config.gzipRequests) { install(ContentEncoding) { From b496669ba448c3de2ba742fdc6f0a8afc9c3481c Mon Sep 17 00:00:00 2001 From: "a.usenko" Date: Wed, 16 Oct 2024 13:27:48 +0300 Subject: [PATCH 2/3] Make lambda customHttpClientConfig private Make api dump --- .../api/elasticmagic-transport-ktor.api | 4 ++-- .../evo/elasticmagic/transport/ElasticsearchKtorTransport.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api b/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api index fc2230da24..b6fcbd0c53 100644 --- a/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api +++ b/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api @@ -1,5 +1,5 @@ public final class dev/evo/elasticmagic/transport/ElasticsearchKtorTransport : dev/evo/elasticmagic/transport/ElasticsearchTransport { - public fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;)V - public synthetic fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public synthetic fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V } diff --git a/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt b/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt index eb1fb62eed..442ebd5851 100644 --- a/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt +++ b/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt @@ -22,7 +22,7 @@ import io.ktor.http.takeFrom class ElasticsearchKtorTransport( baseUrl: String, engine: HttpClientEngine, - val customHttpClientConfig: HttpClientConfig<*>.() -> Unit = {}, + private val customHttpClientConfig: HttpClientConfig<*>.() -> Unit = {}, configure: Config.() -> Unit = {}, ) : ElasticsearchTransport( baseUrl, From c82061c094bf0f39f5469f9378dadc1a4628511f Mon Sep 17 00:00:00 2001 From: "a.usenko" Date: Wed, 16 Oct 2024 14:03:28 +0300 Subject: [PATCH 3/3] Update mkdocs --- buildSrc/src/main/kotlin/Libs.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt index 362872b6e9..0765627f26 100644 --- a/buildSrc/src/main/kotlin/Libs.kt +++ b/buildSrc/src/main/kotlin/Libs.kt @@ -12,7 +12,7 @@ object Versions { const val grgit = "4.1.1" const val detekt = "1.22.0" const val dokka = "1.7.20" - const val mkdocs = "3.0.0" + const val mkdocs = "4.0.1" // With 0.13.0 ':integ-tests:transformJvmTestAtomicfu' task somehow fails const val binaryCompatibilityValidator = "0.12.1"