File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
dp-inntekt-grpc/src/main/kotlin/no/nav/dagpenger/inntekt/rpc Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import no.nav.dagpenger.events.inntekt.v1.Inntekt
18
18
import no.nav.dagpenger.events.inntekt.v1.SpesifisertInntekt
19
19
import no.nav.dagpenger.events.moshiInstance
20
20
21
- interface InntektHenter {
21
+ interface InntektHenter : Closeable {
22
22
suspend fun hentSpesifisertInntekt (inntektId : String ): SpesifisertInntekt
23
23
suspend fun hentKlassifisertInntekt (inntektId : String ): Inntekt
24
24
}
@@ -39,11 +39,15 @@ class InntektHenterWrapper private constructor(
39
39
.executor(Dispatchers .IO .asExecutor())
40
40
.usePlaintext().build()
41
41
)
42
+
43
+ override fun close () {
44
+ client.close()
45
+ }
42
46
}
43
47
44
48
internal class InntektHenterClient constructor(
45
49
private val channel : ManagedChannel
46
- ) : Closeable, InntektHenter {
50
+ ) : InntektHenter {
47
51
48
52
companion object {
49
53
private val spesifisertInntektAdapter = moshiInstance.adapter(SpesifisertInntekt ::class .java)!!
You can’t perform that action at this time.
0 commit comments