Created
May 25, 2021 19:59
-
-
Save jeffscottbrown/b6c881f92e142878e4b4aaee3be2fcc5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.micronaut.health.HealthStatus; | |
| import io.micronaut.management.health.indicator.HealthIndicator; | |
| import io.micronaut.management.health.indicator.HealthResult; | |
| import io.micronaut.management.health.indicator.annotation.Liveness; | |
| import io.reactivex.Flowable; | |
| import org.reactivestreams.Publisher; | |
| import javax.inject.Singleton; | |
| @Singleton | |
| @Liveness | |
| public class MyLivenessIndicator implements HealthIndicator { | |
| @Override | |
| public Publisher<HealthResult> getResult() { | |
| return Flowable.just(HealthResult.builder("liveness").status(HealthStatus.UP).build()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment