aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-utils/src/main
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2019-01-08 07:53:25 +0100
committerFilip Krzywka <filip.krzywka@nokia.com>2019-01-08 12:11:26 +0100
commit5180f3f32a2cdd35206f728e0fd7dd6ad62b567a (patch)
tree3929c3327086a1d9381994e6572b43200519ca20 /sources/hv-collector-utils/src/main
parent8b4e282df3863042c69dae60460ec2397e12562e (diff)
Merge Healthcheck descriptions
- start new API server for healthchecks in xNF simulator on port 6063 - changed DCAE App default port to 6064 - switched to InetSocketAddresses usage in components configurations Change-Id: I398f9ea6e887f78d88286ed717d310d3297b1571 Issue-ID: DCAEGEN2-1063 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'sources/hv-collector-utils/src/main')
-rw-r--r--sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt
index 05d13094..3c2c64ac 100644
--- a/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt
+++ b/sources/hv-collector-utils/src/main/kotlin/org/onap/dcae/collectors/veshv/utils/arrow/effects.kt
@@ -46,10 +46,9 @@ object ExitSuccess : ExitCode() {
data class ExitFailure(override val code: Int) : ExitCode()
-fun Either<IO<Unit>, IO<Unit>>.unsafeRunEitherSync(onError: (Throwable) -> ExitCode, onSuccess: () -> Unit) =
+fun <A, B> Either<IO<A>, IO<B>>.unsafeRunEitherSync(onError: (Throwable) -> ExitCode, onSuccess: () -> Unit) =
flatten().attempt().unsafeRunSync().fold({ onError(it).io().unsafeRunSync() }, { onSuccess() })
-
fun IO<Any>.unit() = map { Unit }
fun <T> Mono<T>.asIo() = IO.async<T> { callback ->