File tree 2 files changed +20
-8
lines changed
src/main/kotlin/no/java/conf/plugins
2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change
1
+ FROM eclipse-temurin:21-jre
2
+
3
+ RUN mkdir -p /opt/app
4
+ COPY build/libs/history.jar /opt/app
5
+ CMD ["java" , "-jar" , "/opt/app/history.jar" ]
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package no.java.conf.plugins
3
3
import arrow.core.raise.either
4
4
import com.jillesvangurp.ktsearch.KtorRestClient
5
5
import com.jillesvangurp.ktsearch.SearchClient
6
+ import io.github.oshai.kotlinlogging.KotlinLogging
6
7
import io.ktor.server.application.Application
7
8
import io.ktor.server.application.call
8
9
import io.ktor.server.request.receiveNullable
@@ -14,19 +15,25 @@ import io.ktor.server.routing.routing
14
15
import no.java.conf.model.search.TextSearchRequest
15
16
import no.java.conf.service.SearchService
16
17
18
+ private val logger = KotlinLogging .logger {}
19
+
17
20
fun searchClient (
18
21
host : String ,
19
22
port : Int ,
20
23
username : String ,
21
24
password : String
22
- ) = SearchClient (
23
- KtorRestClient (
24
- host = host,
25
- port = port,
26
- user = username,
27
- password = password,
28
- ),
29
- )
25
+ ): SearchClient {
26
+ logger.info { " Connection Info: $host :$port with $username " }
27
+
28
+ return SearchClient (
29
+ KtorRestClient (
30
+ host = host,
31
+ port = port,
32
+ user = username,
33
+ password = password,
34
+ ),
35
+ )
36
+ }
30
37
31
38
fun Application.searchClient () =
32
39
searchClient(
You can’t perform that action at this time.
0 commit comments