Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jeffscottbrown/b6c881f92e142878e4b4aaee3be2fcc5 to your computer and use it in GitHub Desktop.

Select an option

Save jeffscottbrown/b6c881f92e142878e4b4aaee3be2fcc5 to your computer and use it in GitHub Desktop.
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