All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.allegro.tech.servicemesh.envoycontrol.infrastructure.health.EnvoyControlHealthIndicator.kt Maven / Gradle / Ivy

There is a newer version: 0.22.5
Show newest version
package pl.allegro.tech.servicemesh.envoycontrol.infrastructure.health

import org.springframework.boot.actuate.health.AbstractHealthIndicator
import org.springframework.boot.actuate.health.Health
import org.springframework.stereotype.Component
import pl.allegro.tech.servicemesh.envoycontrol.services.LocalClusterStateChanges

@Component
class EnvoyControlHealthIndicator(private val localClusterStateChanges: LocalClusterStateChanges)
    : AbstractHealthIndicator() {
    override fun doHealthCheck(builder: Health.Builder?) {
        if (localClusterStateChanges.isInitialStateLoaded()) {
            builder!!.up()
        } else {
            builder!!.down()
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy